Examples of RolePropertiesVO


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

  private ConstraintExceptionBuffer ceb;
 
  public UpdateRolePropertiesAction()
  {
    rolePropertiesVO = new RolePropertiesVO();
    this.ceb = new ConstraintExceptionBuffer()
  }
View Full Code Here

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

                  UserPropertiesVO userPropertiesVO = UserPropertiesController.getController().getUserPropertiesVOWithId(this.entityId);
                  this.contentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithId(userPropertiesVO.getContentTypeDefinitionId());           
              }
              else if(this.entity.equalsIgnoreCase(RoleProperties.class.getName()))
              {
                  RolePropertiesVO rolePropertiesVO = RolePropertiesController.getController().getRolePropertiesVOWithId(this.entityId);
                  this.contentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithId(rolePropertiesVO.getContentTypeDefinitionId());           
              }
              else if(this.entity.equalsIgnoreCase(GroupProperties.class.getName()))
              {
                  GroupPropertiesVO groupPropertiesVO = GroupPropertiesController.getController().getGroupPropertiesVOWithId(this.entityId);
                  this.contentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithId(groupPropertiesVO.getContentTypeDefinitionId());           
View Full Code Here

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

                  UserPropertiesVO userPropertiesVO = UserPropertiesController.getController().getUserPropertiesVOWithId(this.entityId);
                  this.contentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithId(userPropertiesVO.getContentTypeDefinitionId());           
              }
              else if(this.entity.equalsIgnoreCase(RoleProperties.class.getName()))
              {
                  RolePropertiesVO rolePropertiesVO = RolePropertiesController.getController().getRolePropertiesVOWithId(this.entityId);
                  this.contentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithId(rolePropertiesVO.getContentTypeDefinitionId());           
              }
              else if(this.entity.equalsIgnoreCase(GroupProperties.class.getName()))
              {
                  GroupPropertiesVO groupPropertiesVO = GroupPropertiesController.getController().getGroupPropertiesVOWithId(this.entityId);
                  this.contentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithId(groupPropertiesVO.getContentTypeDefinitionId());           
View Full Code Here

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

   * This method updates an extranet role properties.
   */

  public RolePropertiesVO update(Integer languageId, Integer contentTypeDefinitionId, RolePropertiesVO rolePropertiesVO) throws ConstraintException, SystemException
  {
    RolePropertiesVO realRolePropertiesVO = rolePropertiesVO;
     
    if(rolePropertiesVO.getId() == null)
    {
      logger.info("Creating the entity because there was no version at all for: " + contentTypeDefinitionId + " " + languageId);
      realRolePropertiesVO = create(languageId, contentTypeDefinitionId, rolePropertiesVO);
View Full Code Here

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

    {
      List<RolePropertiesVO> roleProperties = RolePropertiesController.getController().getRolePropertiesVOList(propertyName, value, db);
      Iterator<RolePropertiesVO> rolePropertiesIterator = roleProperties.iterator();
      while(rolePropertiesIterator.hasNext())
      {
        RolePropertiesVO rolePropertiesVO = rolePropertiesIterator.next();
        if(useLanguageFallback || (!useLanguageFallback && languageId != null && rolePropertiesVO.getLanguageId().equals(languageId)))
        {
          if(rolePropertiesVO.getRoleName() != null)
          {
            try
            {
              InfoGlueRole role = RoleControllerProxy.getController(db).getRole(rolePropertiesVO.getRoleName());
              if(role != null)
                roles.add(role);
            }
            catch (Exception e)
            {
              logger.warn("No such role or problem getting role " + rolePropertiesVO.getRoleName() + ":" + e.getMessage());
            }
          }
        }
      }
    }
View Full Code Here

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

   * single value and saves it back to the db.
   */
  
  public void updateAttributeValue(Integer rolePropertiesId, String attributeName, String attributeValue) throws SystemException, Bug
  {
    RolePropertiesVO rolePropertiesVO = getRolePropertiesVOWithId(rolePropertiesId);
   
    if(rolePropertiesVO != null)
    {
      try
      {
        logger.info("attributeName:"  + attributeName);
        logger.info("versionValue:"   + rolePropertiesVO.getValue());
        logger.info("attributeValue:" + attributeValue);
        InputSource inputSource = new InputSource(new StringReader(rolePropertiesVO.getValue()));
       
        DOMParser parser = new DOMParser();
        parser.parse(inputSource);
        Document document = parser.getDocument();
       
        NodeList nl = document.getDocumentElement().getChildNodes();
        Node attributesNode = nl.item(0);
       
        boolean existed = false;
        nl = attributesNode.getChildNodes();
        for(int i=0; i<nl.getLength(); i++)
        {
          Node n = nl.item(i);
          if(n.getNodeName().equalsIgnoreCase(attributeName))
          {
            if(n.getFirstChild() != null && n.getFirstChild().getNodeValue() != null)
            {
              n.getFirstChild().setNodeValue(attributeValue);
              existed = true;
              break;
            }
            else
            {
              CDATASection cdata = document.createCDATASection(attributeValue);
              n.appendChild(cdata);
              existed = true;
              break;
            }
          }
        }
       
        if(existed == false)
        {
          org.w3c.dom.Element attributeElement = document.createElement(attributeName);
          attributesNode.appendChild(attributeElement);
          CDATASection cdata = document.createCDATASection(attributeValue);
          attributeElement.appendChild(cdata);
        }
       
        StringBuffer sb = new StringBuffer();
        org.infoglue.cms.util.XMLHelper.serializeDom(document.getDocumentElement(), sb);
        logger.info("sb:" + sb);
        rolePropertiesVO.setValue(sb.toString());
        update(rolePropertiesVO.getLanguageId(), rolePropertiesVO.getContentTypeDefinitionId(), rolePropertiesVO);
      }
      catch(Exception e)
      {
        e.printStackTrace();
      }
View Full Code Here

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

  
  public String getAttributeValue(Integer rolePropertiesId, String attributeName, boolean escapeHTML) throws SystemException, Bug
  {
    String value = "";
   
    RolePropertiesVO rolePropertiesVO = getRolePropertiesVOWithId(rolePropertiesId);
   
    if(rolePropertiesVO != null)
    { 
      value = getAttributeValue(rolePropertiesVO.getValue(), attributeName, escapeHTML);
    }

    return value;
  }
View Full Code Here

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

     
    try
    {
        List rolePropertiesVOList = this.getRolePropertiesVOList(roleName, languageId);
        Iterator iterator = rolePropertiesVOList.iterator();
        RolePropertiesVO rolePropertyVO = null;
        while(iterator.hasNext())
        {
            rolePropertyVO = (RolePropertiesVO)iterator.next();
            break;
        }

      if(rolePropertyVO != null && rolePropertyVO.getId() != null)
      {
          List propertiesCategoryVOList = PropertiesCategoryController.getController().findByPropertiesAttribute(attribute, RoleProperties.class.getName(), rolePropertyVO.getId());
          Iterator propertiesCategoryVOListIterator = propertiesCategoryVOList.iterator();
          while(propertiesCategoryVOListIterator.hasNext())
          {
              PropertiesCategoryVO propertiesCategoryVO = (PropertiesCategoryVO)propertiesCategoryVOListIterator.next();
              relatedCategories.add(propertiesCategoryVO.getCategory());
View Full Code Here

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

   * is handling.
   */

  public BaseEntityVO getNewVO()
  {
    return new RolePropertiesVO();
  }
View Full Code Here

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

        UserPropertiesVO userPropertiesVO = UserPropertiesController.getController().getUserPropertiesVOWithId(this.entityId);
        this.contentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithId(userPropertiesVO.getContentTypeDefinitionId());           
      }
      else if(this.entity.equalsIgnoreCase(RoleProperties.class.getName()))
      {
        RolePropertiesVO rolePropertiesVO = RolePropertiesController.getController().getRolePropertiesVOWithId(this.entityId);
        this.contentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithId(rolePropertiesVO.getContentTypeDefinitionId());           
      }
      else if(this.entity.equalsIgnoreCase(GroupProperties.class.getName()))
      {
        GroupPropertiesVO groupPropertiesVO = GroupPropertiesController.getController().getGroupPropertiesVOWithId(this.entityId);
        this.contentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithId(groupPropertiesVO.getContentTypeDefinitionId());           
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.