Package org.infoglue.cms.entities.management

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


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

    RoleProperties roleProperties = null;

    beginTransaction(db);
    try
    {
      roleProperties = create(languageId, contentTypeDefinitionId, rolePropertiesVO, 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 roleProperties.getValueObject();
  }    
View Full Code Here


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

    RoleProperties roleProperties = new RolePropertiesImpl();
    roleProperties.setLanguage((LanguageImpl)language);
    roleProperties.setContentTypeDefinition((ContentTypeDefinition)contentTypeDefinition);
 
    roleProperties.setValueObject(rolePropertiesVO);
    db.create(roleProperties);
   
    return roleProperties;
  }    
View Full Code Here

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

    RoleProperties roleProperties = null;

    beginTransaction(db);

    try
    {
      //add validation here if needed
      roleProperties = getRolePropertiesWithId(rolePropertiesVO.getRolePropertiesId(), db);        
      roleProperties.setValueObject(rolePropertiesVO);

      //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 roleProperties.getValueObject();
  }    
View Full Code Here

         
        userProperties.getDigitalAssets().add(digitalAsset);           
        }
        else if(entity.equalsIgnoreCase(RoleProperties.class.getName()))
        {
            RoleProperties roleProperties = RolePropertiesController.getController().getRolePropertiesWithId(entityId, db);
        Collection rolePropertiesList = new ArrayList();
        rolePropertiesList.add(roleProperties);
        logger.info("Added roleProperties:" + roleProperties.getId());
        
        digitalAsset = new DigitalAssetImpl();
        digitalAsset.setValueObject(digitalAssetVO);
        if(CmsPropertyHandler.getEnableDiskAssets().equals("false"))
          digitalAsset.setAssetBlob(is);
        digitalAsset.setRoleProperties(rolePropertiesList);
       
        db.create(digitalAsset);
         
        roleProperties.getDigitalAssets().add(digitalAsset);                       
        }
        else if(entity.equalsIgnoreCase(GroupProperties.class.getName()))
        {
            GroupProperties groupProperties = GroupPropertiesController.getController().getGroupPropertiesWithId(entityId, db);
        Collection groupPropertiesList = new ArrayList();
View Full Code Here

TOP

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

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.