Package org.infoglue.cms.entities.management

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


          }
          else
          {
              if(this.entity.equalsIgnoreCase(UserProperties.class.getName()))
              {
                  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());           
View Full Code Here


    try
    {
      List userPropertiesVOList = UserPropertiesController.getController().getUserPropertiesVOList(infoGluePrincipal.getName(), languageId);
      if(userPropertiesVOList != null && userPropertiesVOList.size() > 0)
      {
        UserPropertiesVO userPropertiesVO = (UserPropertiesVO)userPropertiesVOList.get(0);
        if(userPropertiesVO != null && userPropertiesVO.getId() != null)
             {
               digitalAssets = UserPropertiesController.getController().getDigitalAssetVOList(userPropertiesVO.getId());
             }
      }
    }
    catch(Exception e)
    {
View Full Code Here

          }
          else
          {
              if(this.entity.equalsIgnoreCase(UserProperties.class.getName()))
              {
                  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());           
View Full Code Here

   * This method updates an extranet role properties.
   */

  public UserPropertiesVO update(Integer languageId, Integer contentTypeDefinitionId, UserPropertiesVO userPropertiesVO) throws ConstraintException, SystemException, Exception
  {
    UserPropertiesVO realUserPropertiesVO = userPropertiesVO;
     
    if(userPropertiesVO.getId() == null)
    {
      InfoGluePrincipal infoGluePrincipal = UserControllerProxy.getController().getUser(userPropertiesVO.getUserName());
      List userPropertiesVOList = UserPropertiesController.getController().getUserPropertiesVOList(infoGluePrincipal.getName(), languageId);
      if(userPropertiesVOList != null && userPropertiesVOList.size() > 0)
      {
        realUserPropertiesVO = (UserPropertiesVO)userPropertiesVOList.get(0);
        realUserPropertiesVO.setValue(userPropertiesVO.getValue())
      }
      else
      {
        logger.info("Creating the entity because there was no version at all for: " + contentTypeDefinitionId + " " + languageId);
        realUserPropertiesVO = create(languageId, contentTypeDefinitionId, userPropertiesVO);
View Full Code Here

   * single value and saves it back to the db.
   */
  
  public void updateAttributeValue(Integer userPropertiesId, String attributeName, String attributeValue) throws SystemException, Bug
  {
    UserPropertiesVO userPropertiesVO = getUserPropertiesVOWithId(userPropertiesId);
   
    if(userPropertiesVO != null)
    {
      try
      {
        logger.info("attributeName:"  + attributeName);
        logger.info("versionValue:"   + userPropertiesVO.getValue());
        logger.info("attributeValue:" + attributeValue);
        InputSource inputSource = new InputSource(new StringReader(userPropertiesVO.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);
        userPropertiesVO.setValue(sb.toString());
        update(userPropertiesVO.getLanguageId(), userPropertiesVO.getContentTypeDefinitionId(), userPropertiesVO);
      }
      catch(Exception e)
      {
        e.printStackTrace();
      }
View Full Code Here

  
  public String getAttributeValue(Integer userPropertiesId, String attributeName, boolean escapeHTML) throws SystemException, Bug
  {
    String value = "";
   
    UserPropertiesVO userPropertiesVO = getUserPropertiesVOWithId(userPropertiesId);
   
    if(userPropertiesVO != null)
    { 
      try
      {
        logger.info("attributeName:" + attributeName);
        logger.info("VersionValue:"  + userPropertiesVO.getValue());
        InputSource inputSource = new InputSource(new StringReader(userPropertiesVO.getValue()));
       
        DOMParser parser = new DOMParser();
        parser.parse(inputSource);
        Document document = parser.getDocument();
       
View Full Code Here

   * is handling.
   */

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

    }
    else
    {
      if(this.entity.equalsIgnoreCase(UserProperties.class.getName()))
      {
        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());           
View Full Code Here

    }
    else
    {
      if(this.entity.equalsIgnoreCase(UserProperties.class.getName()))
      {
        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());           
View Full Code Here

        logger.info("***********************************************");
       
        try
        {
            initializePrincipal(principalName);
            UserPropertiesVO newUserPropertiesVO = userPropertiesController.update(userPropertiesVO.getLanguageId(), userPropertiesVO.getContentTypeDefinitionId(), userPropertiesVO);
            newUserPropertiesId = newUserPropertiesVO.getId().intValue();
           
      NotificationMessage notificationMessage = new NotificationMessage("RemoteUserProperties.updateUserProperties", UserPropertiesImpl.class.getName(), principalName, NotificationMessage.PUBLISHING, newUserPropertiesVO.getId(), newUserPropertiesVO.getUserName());
      ChangeNotificationController.getInstance().addNotificationMessage(notificationMessage);
        }
        catch(Exception e)
        {
            logger.error("En error occurred when we tried to create a new userProperty:" + e.getMessage(), e);
View Full Code Here

TOP

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

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.