Package org.infoglue.cms.util.sorters

Examples of org.infoglue.cms.util.sorters.ReflectionComparator


       
        if(synchronizeContentTypeDefinitions)
        {
          Object[] contentTypeDefinitionVOArray = (Object[])invokeOperation(targetEndpointAddress, "getContentTypeDefinitions", "contentTypeDefinition", null, new Class[]{ContentTypeDefinitionVO.class}, "infoglue", deploymentServerBean.getUser());
          List remoteContentTypeDefinitionVOList = Arrays.asList(contentTypeDefinitionVOArray);
          Collections.sort(remoteContentTypeDefinitionVOList, new ReflectionComparator("name"));
   
          //logger.info("remoteContentTypeDefinitionVOList:" + remoteContentTypeDefinitionVOList.size());
          if(this.synchronizationMethod.equalsIgnoreCase("pull"))
          {
            Iterator remoteContentTypeDefinitionVOListIterator = remoteContentTypeDefinitionVOList.iterator();
            while(remoteContentTypeDefinitionVOListIterator.hasNext())
            {
              ContentTypeDefinitionVO remoteContentTypeDefinitionVO = (ContentTypeDefinitionVO)remoteContentTypeDefinitionVOListIterator.next();
              //logger.info("remoteContentTypeDefinitionVO:" + remoteContentTypeDefinitionVO.getName());
              ContentTypeDefinitionVO localContentTypeDefinitionVO = (ContentTypeDefinitionVO)ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithName(remoteContentTypeDefinitionVO.getName());
              DeploymentCompareBean bean = new DeploymentCompareBean();
              bean.setRemoteVersion(remoteContentTypeDefinitionVO);
              if(localContentTypeDefinitionVO != null)
              {
                //logger.info("localContentTypeDefinitionVO:" + localContentTypeDefinitionVO.getName());
                  bean.setLocalVersion(localContentTypeDefinitionVO);         
              }
              deviatingContentTypes.add(bean);
            }
          }
          else
          {
            logger.info("Getting what content types are not the same from a push perspective...");
            List localContentTypeDefinitionVOList = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOList();
            Iterator localContentTypeDefinitionVOListIterator = localContentTypeDefinitionVOList.iterator();
            while(localContentTypeDefinitionVOListIterator.hasNext())
            {
              ContentTypeDefinitionVO localContentTypeDefinitionVO = (ContentTypeDefinitionVO)localContentTypeDefinitionVOListIterator.next();
              Iterator remoteContentTypeDefinitionVOListIterator = remoteContentTypeDefinitionVOList.iterator();
              ContentTypeDefinitionVO remoteContentTypeDefinitionVO = null;
              while(remoteContentTypeDefinitionVOListIterator.hasNext())
              {
                ContentTypeDefinitionVO remoteContentTypeDefinitionVOCandidate = (ContentTypeDefinitionVO)remoteContentTypeDefinitionVOListIterator.next();
                //logger.info("remoteContentTypeDefinitionVO:" + remoteContentTypeDefinitionVO.getName());
                if(remoteContentTypeDefinitionVOCandidate.getName().equals(localContentTypeDefinitionVO.getName()))
                  remoteContentTypeDefinitionVO = remoteContentTypeDefinitionVOCandidate;
             
             
              DeploymentCompareBean bean = new DeploymentCompareBean();
              bean.setLocalVersion(localContentTypeDefinitionVO);
              if(remoteContentTypeDefinitionVO != null)
              {
                //logger.info("localContentTypeDefinitionVO:" + localContentTypeDefinitionVO.getName());
                bean.setRemoteVersion(remoteContentTypeDefinitionVO);
              }
              deviatingContentTypes.add(bean);
            }
          }
        }
       
        if(synchronizeCategories)
        {
          //Getting deviatingCategories
          Object[] categoryVOArray = (Object[])invokeOperation(targetEndpointAddress, "getAllActiveCategories", "category", null, new Class[]{CategoryVO.class}, "infoglue", deploymentServerBean.getUser());
          List remoteCategoryVOList = Arrays.asList(categoryVOArray);
          Collections.sort(remoteCategoryVOList, new ReflectionComparator("name"));
          //logger.info("remoteCategoryVOList:" + remoteCategoryVOList.size());
         
          List<CategoryVO> allLocalCategories = CategoryController.getController().findAllActiveCategories(true);
          //logger.info("allLocalCategories:" + allLocalCategories.size());
         
          if(this.synchronizationMethod.equalsIgnoreCase("push"))
            compareCategoryLists(remoteCategoryVOList, allLocalCategories);
          else
            compareCategoryLists(allLocalCategories, remoteCategoryVOList);
           
          //logger.info("deviatingCategoryVOList:" + deviatingCategoryVOList.size());
         
        }
       
        if(synchronizeWorkflows)
        {
          //Getting deviatingWorkflows
          Object[] workflowVOArray = (Object[])invokeOperation(targetEndpointAddress, "getWorkflowDefinitions", "workflowDefinition", null, new Class[]{WorkflowDefinitionVO.class}, "infoglue", deploymentServerBean.getUser());
          List remoteWorkflowDefinitionVOList = Arrays.asList(workflowVOArray);
          Collections.sort(remoteWorkflowDefinitionVOList, new ReflectionComparator("name"));
   
          //logger.info("remoteWorkflowDefinitionVOList:" + remoteWorkflowDefinitionVOList.size());
         
          if(this.synchronizationMethod.equalsIgnoreCase("pull"))
          {
View Full Code Here


     
      if(this.synchronizationMethod == null || this.synchronizationMethod.equalsIgnoreCase("pull"))
      {
        Object[] contentTypeDefinitionVOArray = (Object[])invokeOperation(targetEndpointAddress, "getContentTypeDefinitions", "contentTypeDefinition", null, new Class[]{ContentTypeDefinitionVO.class}, "infoglue", deploymentServerBean.getUser());
        List remoteContentTypeDefinitionVOList = Arrays.asList(contentTypeDefinitionVOArray);
        Collections.sort(remoteContentTypeDefinitionVOList, new ReflectionComparator("name"));
 
        //logger.info("remoteContentTypeDefinitionVOList:" + remoteContentTypeDefinitionVOList.size());
 
        String[] missingContentTypeNameArray = this.getRequest().getParameterValues("missingContentTypeName");
        //logger.info("missingContentTypeNameArray:" + missingContentTypeNameArray);
View Full Code Here

     
      if(this.synchronizationMethod == null || this.synchronizationMethod.equalsIgnoreCase("pull"))
      {
        Object[] categoryVOArray = (Object[])invokeOperation(targetEndpointAddress, "getAllActiveCategories", "category", null, new Class[]{CategoryVO.class}, "infoglue", deploymentServerBean.getUser());
        List remoteCategoryVOList = Arrays.asList(categoryVOArray);
        Collections.sort(remoteCategoryVOList, new ReflectionComparator("name"));
        //logger.info("remoteCategoryVOList:" + remoteCategoryVOList.size());
       
        List<CategoryVO> allLocalCategories = CategoryController.getController().getAllActiveCategories();
        //logger.info("allLocalCategories:" + allLocalCategories.size());
       
View Full Code Here

     
      if(this.synchronizationMethod == null || this.synchronizationMethod.equalsIgnoreCase("pull"))
      {
        Object[] workflowDefinitionVOArray = (Object[])invokeOperation(targetEndpointAddress, "getWorkflowDefinitions", "workflowDefinition", null, new Class[]{WorkflowDefinitionVO.class}, "infoglue", deploymentServerBean.getUser());
        List remoteWorkflowDefinitionVOList = Arrays.asList(workflowDefinitionVOArray);
        Collections.sort(remoteWorkflowDefinitionVOList, new ReflectionComparator("name"));
 
        //logger.info("remoteWorkflowDefinitionVOList:" + remoteWorkflowDefinitionVOList.size());
 
        String[] missingWorkflowDefinitionNameArray = this.getRequest().getParameterValues("missingWorkflowDefinitionName");
        //logger.info("missingWorkflowDefinitionNameArray:" + missingWorkflowDefinitionNameArray);
View Full Code Here

      if(this.synchronizationMethod == null || this.synchronizationMethod.equalsIgnoreCase("pull"))
      {
        Object[] contentVOArray = (Object[])invokeOperation(targetEndpointAddress, "getComponents", "content", null, new Class[]{ContentVO.class, ContentVersionVO.class}, "infoglue", deploymentServerBean.getUser());
        List remoteContentVOList = Arrays.asList(contentVOArray);
        Collections.sort(remoteContentVOList, new ReflectionComparator("name"));
 
        //Missing
        String[] missingRemoteContentIdArray = this.getRequest().getParameterValues("missingContentId");
        logger.info("missingRemoteContentIdArray:" + missingRemoteContentIdArray);
       
View Full Code Here

      t.printElapsedTime("Done filtering children");
       
    //Sort the tree nodes if setup to do so
    String sortProperty = CmsPropertyHandler.getContentTreeSort();
    if(sortProperty != null)
      Collections.sort(children, new ReflectionComparator(sortProperty));
    t.printElapsedTime("sorting children took");
   
    Iterator i = children.iterator();
    while(i.hasNext())
    {
View Full Code Here

    {
      List roles = new ArrayList();
     
    roles = getAuthorizationModule().getRoles();
   
    Collections.sort(roles, new ReflectionComparator("displayName"));
   
      return roles;
    }
View Full Code Here

  {
    List<InfoGluePrincipal> infoGluePrincipals = new ArrayList<InfoGluePrincipal>();
     
    infoGluePrincipals = getAuthorizationModule().getUsers(roleName);
   
    Collections.sort(infoGluePrincipals, new ReflectionComparator("displayName"));
     
    return infoGluePrincipals;
  }
View Full Code Here

 
  public List getSortedAuthorizedContentTypeDefinitionVOList(InfoGluePrincipal infoGluePrincipal, Database db) throws ConstraintException, SystemException, Bug
  {
    List authorizedContentTypeDefinitionVOList = getAuthorizedContentTypeDefinitionVOList(infoGluePrincipal, db);
   
    Collections.sort(authorizedContentTypeDefinitionVOList, new ReflectionComparator("name"));
   
    return authorizedContentTypeDefinitionVOList;
  }
View Full Code Here

      if(protectContentTypes != null && protectContentTypes.equalsIgnoreCase("true"))
          contentTypeVOList = ContentTypeDefinitionController.getController().getAuthorizedContentTypeDefinitionVOList(this.getInfoGluePrincipal());
    else
        contentTypeVOList = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOList();
     
      Collections.sort(contentTypeVOList, new ReflectionComparator("name"));
     
      return contentTypeVOList;
  }     
View Full Code Here

TOP

Related Classes of org.infoglue.cms.util.sorters.ReflectionComparator

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.