Package org.infoglue.cms.entities.management

Examples of org.infoglue.cms.entities.management.GroupProperties


        Collection groupPropertiesList = GroupPropertiesController.getController().getGroupPropertiesList(group.getName(), languageId, db, true);

        Iterator groupPropertiesListIterator = groupPropertiesList.iterator();
        while(groupPropertiesListIterator.hasNext())
        {
          GroupProperties groupProperties = (GroupProperties)groupPropertiesListIterator.next();
         
          if(groupProperties != null && groupProperties.getLanguage().getLanguageId().equals(languageId) && groupProperties.getValue() != null && propertyName != null)
          {
            String propertyXML = groupProperties.getValue();
            DOMBuilder domBuilder = new DOMBuilder();
            Document document = domBuilder.getDocument(propertyXML);
           
            Node propertyPriorityNode = document.getRootElement().selectSingleNode("attributes/PropertyPriority");
            int currentPriority = 0;
View Full Code Here


       
        Collection groupPropertiesList = GroupPropertiesController.getController().getGroupPropertiesList(group.getName(), languageId, db, true);
        Iterator groupPropertiesListIterator = groupPropertiesList.iterator();
        while(groupPropertiesListIterator.hasNext())
        {
          GroupProperties groupProperties = (GroupProperties)groupPropertiesListIterator.next();
         
          if(groupProperties != null && groupProperties.getLanguage().getLanguageId().equals(languageId))
          {
              Collection assets = groupProperties.getDigitalAssets();
              Iterator assetsIterator = assets.iterator();
              while(assetsIterator.hasNext())
              {
                  DigitalAsset digitalAsset = (DigitalAsset)assetsIterator.next();
                  if(digitalAsset.getAssetKey().equalsIgnoreCase(assetKey))
View Full Code Here

       
        Collection groupPropertiesList = GroupPropertiesController.getController().getGroupPropertiesList(group.getName(), languageId, db, true);
        Iterator groupPropertiesListIterator = groupPropertiesList.iterator();
        while(groupPropertiesListIterator.hasNext())
        {
          GroupProperties groupProperties = (GroupProperties)groupPropertiesListIterator.next();
         
          if(groupProperties != null && groupProperties.getLanguage().getLanguageId().equals(languageId))
          {
              Collection assets = groupProperties.getDigitalAssets();
              Iterator assetsIterator = assets.iterator();
              while(assetsIterator.hasNext())
              {
                  DigitalAsset digitalAsset = (DigitalAsset)assetsIterator.next();
                  if(digitalAsset.getAssetKey().equalsIgnoreCase(assetKey))
View Full Code Here

  public GroupPropertiesVO create(Integer languageId, Integer contentTypeDefinitionId, GroupPropertiesVO groupPropertiesVO) throws ConstraintException, SystemException
    {
    Database db = CastorDatabaseService.getDatabase();
    ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer();

    GroupProperties groupProperties = null;

    beginTransaction(db);
    try
    {
      groupProperties = create(languageId, contentTypeDefinitionId, groupPropertiesVO, db);
      commitTransaction(db);
    }
    catch(Exception e)
    {
      logger.error("An error occurred so we should not completes the transaction:" + e, e);
      rollbackTransaction(db);
      throw new SystemException(e.getMessage());
    }
   
    return groupProperties.getValueObject();
  }    
View Full Code Here

  public GroupProperties create(Integer languageId, Integer contentTypeDefinitionId, GroupPropertiesVO groupPropertiesVO, Database db) throws ConstraintException, SystemException, Exception
    {
    Language language = LanguageController.getController().getLanguageWithId(languageId, db);
    ContentTypeDefinition contentTypeDefinition = ContentTypeDefinitionController.getController().getContentTypeDefinitionWithId(contentTypeDefinitionId, db);

    GroupProperties groupProperties = new GroupPropertiesImpl();
    groupProperties.setLanguage((LanguageImpl)language);
    groupProperties.setContentTypeDefinition((ContentTypeDefinition)contentTypeDefinition);
 
    groupProperties.setValueObject(groupPropertiesVO);
    db.create(groupProperties);
   
    return groupProperties;
  }    
View Full Code Here

  public GroupPropertiesVO update(GroupPropertiesVO groupPropertiesVO, String[] extranetUsers) throws ConstraintException, SystemException
  {
    Database db = CastorDatabaseService.getDatabase();
    ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer();

    GroupProperties groupProperties = null;

    beginTransaction(db);

    try
    {
      //add validation here if needed
      groupProperties = getGroupPropertiesWithId(groupPropertiesVO.getGroupPropertiesId(), db);        
      groupProperties.setValueObject(groupPropertiesVO);

      //If any of the validations or setMethods reported an error, we throw them up now before create.
      ceb.throwIfNotEmpty();
           
      commitTransaction(db);
    }
    catch(ConstraintException ce)
    {
      logger.warn("An error occurred so we should not complete the transaction:" + ce, ce);
      rollbackTransaction(db);
      throw ce;
    }
    catch(Exception e)
    {
      logger.error("An error occurred so we should not complete the transaction:" + e, e);
      rollbackTransaction(db);
      throw new SystemException(e.getMessage());
    }

    return groupProperties.getValueObject();
  }    
View Full Code Here

          results = oql.execute();
      }  
 
      while (results.hasMore())
      {
        GroupProperties groupProperties = (GroupProperties)results.next();
        logger.info("Found one:" + groupProperties);
        groupPropertiesList.add(groupProperties);
      }
     
      logger.info("In total:" + groupPropertiesList.size());
View Full Code Here

    QueryResults results = oql.execute(Database.READONLY);

    while (results.hasMore())
    {
      GroupProperties groupProperties = (GroupProperties)results.next();
      groupPropertiesVOList.add(groupProperties.getValueObject());
    }
   
    results.close();
    oql.close();
View Full Code Here

        beginTransaction(db);

        try
        {
      GroupProperties groupProperties = GroupPropertiesController.getController().getGroupPropertiesWithId(groupPropertiesId, db);
      if(groupProperties != null)
      {
        Collection digitalAssets = groupProperties.getDigitalAssets();
        digitalAssetVOList = toVOList(digitalAssets);
      }
                 
            commitTransaction(db);
        }
View Full Code Here

  /**
   * This method deletes the relation to a digital asset - not the asset itself.
   */
  public void deleteDigitalAssetRelation(Integer groupPropertiesId, DigitalAsset digitalAsset, Database db) throws SystemException, Bug
    {
      GroupProperties groupProperties = getGroupPropertiesWithId(groupPropertiesId, db);
      groupProperties.getDigitalAssets().remove(digitalAsset);
      digitalAsset.getGroupProperties().remove(groupProperties);
    }
View Full Code Here

TOP

Related Classes of org.infoglue.cms.entities.management.GroupProperties

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.