Package org.infoglue.cms.entities.management

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


            this.contentVO = ContentControllerProxy.getController().getACContentVOWithId(this.getInfoGluePrincipal(), getContentId());
    }
     
      if(languageId == null)
      {
        LanguageVO languageVO = LanguageController.getController().getMasterLanguage(this.contentVO.getRepositoryId());
        if(languageVO != null)
        {
            languageId = languageVO.getId();
            this.languageId = languageId;
        }
      }

      this.contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(this.contentVO.getId(), languageId);
      if(this.contentVersionVO == null)
    {
        //logger.info("repositoryId:" + repositoryId);
        Integer usedRepositoryId = this.repositoryId;
        if(this.repositoryId == null && this.contentVO != null)
            usedRepositoryId = this.contentVO.getRepositoryId();
       
        LanguageVO masterLanguageVO = LanguageController.getController().getMasterLanguage(usedRepositoryId);
        //logger.info("MasterLanguage: " + masterLanguageVO);
        this.contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(this.contentVO.getId(), masterLanguageVO.getId());
    }
        
    this.repositories = RepositoryController.getController().getAuthorizedRepositoryVOList(this.getInfoGluePrincipal(), true);

    return "viewAssetsDialogForFCKEditorV3";
View Full Code Here


            this.contentVO = ContentControllerProxy.getController().getACContentVOWithId(this.getInfoGluePrincipal(), getContentId());
    }

    if(contentVersionVO.getContentVersionId() == null)
    {
      LanguageVO masterLanguageVO = LanguageController.getController().getMasterLanguage(contentVO.getRepositoryId());
      contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(getContentId(), masterLanguageVO.getId());
    }

    this.repositories = RepositoryController.getController().getAuthorizedRepositoryVOList(this.getInfoGluePrincipal(), true);

    return "viewAssetBrowserForFCKEditorV3";
View Full Code Here

    return Collections.EMPTY_LIST;
  }
 
  public ContentVersionVO getMasterContentVersionVO(Integer contentId, Integer repositoryId) throws SystemException, Exception
  {
      LanguageVO masterLanguageVO = LanguageController.getController().getMasterLanguage(repositoryId);
      return ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentId, masterLanguageVO.getId());
  }
View Full Code Here

      Integer siteNodeId = new Integer(this.getRequest().getParameter("siteNodeId"));
      Integer languageId = new Integer(this.getRequest().getParameter("languageId"));
      Integer contentId  = new Integer(this.getRequest().getParameter("contentId"));
      String propertyName = this.getRequest().getParameter("propertyName");
             
      LanguageVO masterLanguageVO = LanguageController.getController().getMasterLanguage(repositoryId);   

      String componentXML   = getPageComponentsString(siteNodeId, masterLanguageVO.getId(), contentId);     
      //logger.info("componentXML:" + componentXML);
 
      org.w3c.dom.Document document = XMLHelper.readDocumentFromByteArray(componentXML.getBytes("UTF-8"));
      String componentXPath = "//component[@id=" + this.componentId + "]/properties/property[@name='" + propertyName + "']/binding";
      NodeList anl = org.apache.xpath.XPathAPI.selectNodeList(document.getDocumentElement(), componentXPath);
View Full Code Here

     
      ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentVO.getId(), languageId);
      if(contentVersionVO == null)
      {
        SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId);
        LanguageVO masterLanguage = LanguageController.getController().getMasterLanguage(siteNodeVO.getRepositoryId());
        contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentVO.getId(), masterLanguage.getLanguageId());
      }
     
      template = ContentVersionController.getContentVersionController().getAttributeValue(contentVersionVO.getId(), "ComponentStructure", false);
     
      if(template == null)
View Full Code Here

      ContentVO contentVO = ContentControllerProxy.getController().getACContentVOWithId(getInfoGluePrincipal(), contentId);
      List languageVOList = LanguageController.getController().getLanguageVOList(contentVO.getRepositoryId());
      Iterator languageVOListIterator = languageVOList.iterator();
      while(languageVOListIterator.hasNext())
      {
        LanguageVO language = (LanguageVO)languageVOListIterator.next();
        ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentId, language.getId());
        if(contentVersionVO != null && contentVersionVO.getStateId().equals(ContentVersionVO.WORKING_STATE))
        {
          contentVersionVOList.add(contentVersionVO);
        }
        else if(contentVersionVO != null && contentVersionVO.getStateId().equals(ContentVersionVO.PUBLISH_STATE))
View Full Code Here

            DeploymentCompareBean bean = new DeploymentCompareBean();
            bean.setRemoteVersion(remoteContentVO);
            if(localComponentContent != null)
            {
                bean.setLocalVersion(localComponentContent);
            LanguageVO languageVO = LanguageController.getController().getMasterLanguage(localComponentContent.getRepositoryId());
            ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(localComponentContent.getId(), languageVO.getId());
            if(contentVersionVO != null)
            {
              localComponentContent.setVersions(new String[]{contentVersionVO.getVersionValue()});
              localComponentContent.setContentVersion(contentVersionVO);
            }
            }
            deviatingContents.add(bean);
          }
        }
       
        if(!match)
        {
          DeploymentCompareBean bean = new DeploymentCompareBean();
          if(localComponentContent != null)
          {
              bean.setLocalVersion(localComponentContent);

          localComponentContent.setFullPath(localFullPath);
         
          LanguageVO languageVO = LanguageController.getController().getMasterLanguage(localComponentContent.getRepositoryId());
          ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(localComponentContent.getId(), languageVO.getId());
          if(contentVersionVO != null)
          {
            localComponentContent.setVersions(new String[]{contentVersionVO.getVersionValue()});
            localComponentContent.setContentVersion(contentVersionVO);
          }
View Full Code Here

            logger.info("missingLocalContentId:" + missingLocalContentId);
                 
            ContentVO contentVO = ContentController.getContentController().getContentVOWithId(new Integer(missingLocalContentId).intValue());
          if(contentVO != null)
          {
          LanguageVO languageVO = LanguageController.getController().getMasterLanguage(contentVO.getRepositoryId());
         
          String fullPath = ContentController.getContentController().getContentPath(contentVO.getId(), true, true);
         
          ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentVO.getId(), languageVO.getId());
          if(contentVersionVO != null)
          {
            contentVO.setVersions(new String[]{contentVersionVO.getVersionValue()});
            contentVO.setVersionComments(new String[]{contentVersionVO.getVersionComment()});
          }
         
          contentVO.setFullPath(fullPath);

          missingComponents.add(contentVO);
          }
        }
      }

      String[] deviatingLocalContentIdArray = this.getRequest().getParameterValues("deviatingContentId");
      logger.info("deviatingLocalContentIdArray:" + deviatingLocalContentIdArray);
     
      List deviatingComponents = new ArrayList();
      if(deviatingLocalContentIdArray != null)
      {
        for(int i=0; i<deviatingLocalContentIdArray.length; i++)
        {
          String deviatingLocalContentId = deviatingLocalContentIdArray[i];
            logger.info("deviatingLocalContentId:" + deviatingLocalContentId);
       
            String deviatingRemoteVersionId = this.getRequest().getParameter("deviatingRemoteVersionId_" + deviatingLocalContentId);
            logger.info("deviatingRemoteVersionId:" + deviatingRemoteVersionId);

          ContentVO contentVO = ContentController.getContentController().getContentVOWithId(new Integer(deviatingLocalContentId).intValue());
          if(contentVO != null)
          {
          LanguageVO languageVO = LanguageController.getController().getMasterLanguage(contentVO.getRepositoryId());
         
          //String fullPath = ContentController.getContentController().getContentPath(contentVO.getId(), true, true);
         
          ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentVO.getId(), languageVO.getId());
          if(contentVersionVO != null)
          {
            contentVO.setVersions(new String[]{contentVersionVO.getVersionValue()});
            contentVO.setVersionComments(new String[]{contentVersionVO.getVersionComment()});
          }
View Full Code Here

      Iterator<SiteNodeVO> i = childrenVOList.iterator();
      while(i.hasNext())
      {
        SiteNodeVO vo = i.next();

        LanguageVO masterLanguageVO = LanguageController.getController().getMasterLanguage(vo.getRepositoryId(), db);

        boolean hasUserPageAccess = true;
        String useAccessRightsOnStructureTreeString = CmsPropertyHandler.getUseAccessRightsOnStructureTree();
        if(useAccessRightsOnStructureTreeString != null && useAccessRightsOnStructureTreeString.equalsIgnoreCase("true"))
          hasUserPageAccess = getHasUserPageAccess(this.infogluePrincipal, vo.getId());
       
        if(hasUserPageAccess)
        {
          BaseNode node =  new SiteNodeNodeImpl();
          node.setId(vo.getId());
          node.setTitle(vo.getName());
         
          Boolean isLanguageAvailable = SiteNodeController.getController().getIsLanguageAvailable(vo.getId(), this.sortLanguageId, db, this.infogluePrincipal);
          node.getParameters().put("isLanguageAvailable", "" + isLanguageAvailable);
         
          ContentVersionVO cvVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(vo.getMetaInfoContentId(), this.sortLanguageId, db);
          if(cvVO != null)
          {
            node.getParameters().put("isLocalized", "true");
            String navigationTitle = ContentVersionController.getContentVersionController().getAttributeValue(cvVO, "NavigationTitle", true);
            node.setLocalizedTitle(navigationTitle);
          }
          else
          {
            node.getParameters().put("isLocalized", "false");
            if(this.sortLanguageId != null && masterLanguageVO.getId().intValue() != this.sortLanguageId.intValue())
            {
              ContentVersionVO masterCVVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(vo.getMetaInfoContentId(), masterLanguageVO.getId(), db);
              if(masterCVVO != null)
              {
                String navigationTitle = ContentVersionController.getContentVersionController().getAttributeValue(masterCVVO, "NavigationTitle", true);
                node.setLocalizedTitle(navigationTitle);
              }
            }
          }
         
          if(vo.getIsHidden() != null)
            node.getParameters().put("isHidden", "" + vo.getIsHidden());

          if(vo.getStateId() != null)
          {
            if(vo.getStateId() != SiteNodeVersionVO.PUBLISHED_STATE)
            {
              Timer t = new Timer();
              Set<SiteNodeVersionVO> siteNodeVersionVOList = new HashSet<SiteNodeVersionVO>();
              Set<ContentVersionVO> contentVersionVOList = new HashSet<ContentVersionVO>();
             
              ProcessBean processBean = ProcessBean.createProcessBean(ViewListSiteNodeVersionAction.class.getName(), "" + infogluePrincipal.getName());
              SiteNodeVersionController.getController().getSiteNodeAndAffectedItemsRecursive(vo.getId(), SiteNodeVersionVO.WORKING_STATE, siteNodeVersionVOList, contentVersionVOList, false, false, infogluePrincipal, processBean, masterLanguageVO.getLocale(), -1);
              if(siteNodeVersionVOList.size() > 0 || contentVersionVOList.size() > 0)
                node.getParameters().put("stateId", "0");
              else
                node.getParameters().put("stateId", "" + vo.getStateId());
             
View Full Code Here

          String repositoryName = getRepositoryNameFromCheckoutFile(missingRemoteContentFile);
          logger.info("repositoryName:" + repositoryName);
          logger.info("templateLanguageCode:" + templateLanguageCode);
        RepositoryVO repositoryVO = RepositoryController.getController().getRepositoryVOWithName(repositoryName);
        LanguageVO masterLanguageVO = LanguageController.getController().getLanguageVOWithCode(templateLanguageCode);
       
       
        ContentVO localParentContentVO = null;
        if(repositoryVO == null)
        {
          RepositoryVO newRepositoryVO = new RepositoryVO();
          newRepositoryVO.setName(repositoryName);
          newRepositoryVO.setDnsName("undefined");
          newRepositoryVO.setDescription("Autogenerated during cvs sync");

          repositoryVO = RepositoryController.getController().create(newRepositoryVO);
          if(masterLanguageVO == null)
            masterLanguageVO = (LanguageVO)LanguageController.getController().getLanguageVOList().get(0);
         
          RepositoryLanguageController.getController().createRepositoryLanguage(repositoryVO.getId(), masterLanguageVO.getId(), 0);
          localParentContentVO = ContentController.getContentController().getRootContentVO(repositoryVO.getId(), getInfoGluePrincipal().getName(), true);
          this.repositoryCreated = true;
        }
        else
        {
          logger.info("Found repository:" + repositoryVO.getName());
          localParentContentVO = ContentController.getContentController().getRootContentVO(repositoryVO.getId(), getInfoGluePrincipal().getName(), true);
          masterLanguageVO = LanguageController.getController().getMasterLanguage(repositoryVO.getId());
        }
       
        String contentPath = getContentPathAsListFromCheckoutFile(missingRemoteContentFile);
        logger.info("contentPath:" + contentPath);
       
        ContentVO contentVO = ContentController.getContentController().getContentVOWithPath(repositoryVO.getId(), contentPath, true, getInfoGluePrincipal());
          if(contentVO != null)
          {
            if(missingRemoteContentFile.isFile())
            {
              ContentVO newContentVO = new ContentVO();
              newContentVO.setCreatorName(getInfoGluePrincipal().getName());
              newContentVO.setIsBranch(false);
              newContentVO.setName(plainName);
              ContentVO newlyCreatedContentVO = ContentController.getContentController().create(contentVO.getId(), ctd.getContentTypeDefinitionId(), contentVO.getRepositoryId(), newContentVO);
             
              logger.info("Created content:" + newlyCreatedContentVO.getName());
 
              String fileContent = "";
              if(missingRemoteContentFile.exists())
                fileContent = FileHelper.getFileAsString(missingRemoteContentFile, "iso-8859-1");
           
              ContentVersionVO newContentVersionVO = new ContentVersionVO();
              newContentVersionVO.setVersionComment("Checked out from version control system (tag: " + tagName + ")");
              newContentVersionVO.setVersionModifier(getInfoGluePrincipal().getName());
              newContentVersionVO.setVersionValue(fileContent);
              ContentVersionController.getContentVersionController().create(newlyCreatedContentVO.getId(), masterLanguageVO.getId(), newContentVersionVO, null);
            }
            else
            {
              ContentVO newContentVO = new ContentVO();
              newContentVO.setCreatorName(getInfoGluePrincipal().getName());
              newContentVO.setIsBranch(true);
              newContentVO.setName(plainName);
              ContentVO newlyCreatedContentVO = ContentController.getContentController().create(contentVO.getId(), ctdFolder.getContentTypeDefinitionId(), contentVO.getRepositoryId(), newContentVO);
             
              logger.info("Created content:" + newlyCreatedContentVO.getName());
            }
        }
        }
      }
     
      String[] deviatingLocalContentIdArray = this.getRequest().getParameterValues("deviatingContentId");
      logger.info("deviatingLocalContentIdArray:" + deviatingLocalContentIdArray);
     
      List deviatingComponents = new ArrayList();
      if(deviatingLocalContentIdArray != null)
      {
        for(int i=0; i<deviatingLocalContentIdArray.length; i++)
        {
          String deviatingLocalContentId = deviatingLocalContentIdArray[i];
          logger.info("deviatingLocalContentId:" + deviatingLocalContentId);
       
            String deviatingFilePath = this.getRequest().getParameter("deviatingRemoteVersionId_" + deviatingLocalContentId);
            logger.info("deviatingFilePath:" + deviatingFilePath);
           
            ContentVO contentVO = ContentController.getContentController().getContentVOWithId(new Integer(deviatingLocalContentId).intValue());
          if(contentVO != null)
          {
          LanguageVO languageVO = LanguageController.getController().getMasterLanguage(contentVO.getRepositoryId());
          ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentVO.getId(), languageVO.getId());
          String fileContent = FileHelper.getFileAsString(new File(deviatingFilePath), "iso-8859-1");
         
          contentVersionVO.setVersionValue(fileContent);
          contentVersionVO.setVersionComment("Checked out from version control system (tag: " + tagName + ")");
         
View Full Code Here

TOP

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

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.