Package org.infoglue.cms.entities.management

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


  {
    String pageUrl = "";
   
    try
    {
      LanguageVO languageVO = LanguageDeliveryController.getLanguageDeliveryController().getLanguageWithCode(getDatabase(), languageCode);   
      //pageUrl = this.nodeDeliveryController.getPageUrl(this.siteNodeId, languageVO.getLanguageId(), this.contentId);
      pageUrl = this.nodeDeliveryController.getPageUrlAfterLanguageChange(getDatabase(), this.getPrincipal(), this.siteNodeId, languageVO.getLanguageId(), this.contentId, this.deliveryContext);
    }
    catch(Exception e)
    {
      logger.error("An error occurred trying to get the new page-url after language-change:" + e.getMessage(), e);
    }
View Full Code Here


    {
      availableLanguages = LanguageDeliveryController.getLanguageDeliveryController().getAvailableLanguages(getDatabase(), siteNodeId);
      Iterator languageIterator = availableLanguages.iterator();
      while(languageIterator.hasNext())
      {
        LanguageVO languageVO = (LanguageVO)languageIterator.next();
        ContentVO contentVO = this.nodeDeliveryController.getBoundContent(getDatabase(), this.getPrincipal(), siteNodeId, this.languageId, USE_LANGUAGE_FALLBACK, META_INFO_BINDING_NAME, this.deliveryContext);   
        ContentVersionVO contentVersionVO = null;
        if(contentVO != null)
        {
          contentVersionVO = ContentDeliveryController.getContentDeliveryController().getContentVersionVO(getDatabase(), siteNodeId, contentVO.getId(), languageVO.getId(), false, this.deliveryContext, this.infoGluePrincipal);
        }
       
        if(contentVO == null || contentVersionVO == null)   
        { 
          logger.warn("The meta-info did not have a version of " + languageVO.getName());
          languageIterator.remove();
        }
      }
    }
    catch(Exception e)
View Full Code Here

          WebPage webPage = new WebPage();
          webPage.setSiteNodeId(siteNodeVO.getSiteNodeId());
          webPage.setLanguageId(this.languageId);
          webPage.setContentId(null);
         
          LanguageVO masterLanguageVO = LanguageDeliveryController.getLanguageDeliveryController().getMasterLanguageForRepository(getDatabase(), siteNodeVO.getRepositoryId());
          webPage.setNavigationTitle(this.nodeDeliveryController.getPageNavigationTitle(getDatabase(), this.getPrincipal(), siteNodeVO.getId(), siteNodeVO.getRepositoryId(), this.languageId, siteNodeVO.getMetaInfoContentId(), META_INFO_BINDING_NAME, NAV_TITLE_ATTRIBUTE_NAME, USE_LANGUAGE_FALLBACK, this.deliveryContext, escapeHTML));
          //System.out.println("Populating nav title for " + siteNodeVO.getName());
          if(siteNodeVO.getMetaInfoContentId() != null)
          {
            if(deliveryContext != null)
View Full Code Here

   * This method supplies a method to get the locale of the language currently in use.
   */
 
  public LanguageVO getLanguage(Integer languageId)
  {
      LanguageVO language = null;
       
        try
        {
            language = LanguageDeliveryController.getLanguageDeliveryController().getLanguageVO(getDatabase(), languageId);
        }
View Full Code Here

   * This method supplies a method to get the locale of the language currently in use.
   */
 
  public LanguageVO getLanguage(String languageCode)
  {
      LanguageVO language = null;
       
        try
        {
            language = LanguageDeliveryController.getLanguageDeliveryController().getLanguageWithCode(getDatabase(), languageCode);
        }
View Full Code Here

            String pagePartString = this.getTemplateController().getContentAttribute(contentId, "ComponentStructure", true);
            logger.info("pagePartString: " + pagePartString);
            if(pagePartString == null || pagePartString.equals(""))
            {
              ContentVO contentVO = ContentDeliveryController.getContentDeliveryController().getContentVO(getTemplateController().getDatabase(), contentId, getTemplateController().getDeliveryContext());
              LanguageVO masterLanguageVO = LanguageController.getController().getMasterLanguage(contentVO.getRepositoryId(), getTemplateController().getDatabase());
              pagePartString = this.getTemplateController().getContentAttribute(contentId, masterLanguageVO.getId(), "ComponentStructure", true);
              logger.info("pagePartString: " + pagePartString);
            }
           
            pagePartString = pagePartString.replaceFirst(" id=\".*?\"", " id=\"" + id + "\"");
            pagePartString = pagePartString.replaceFirst(" name=\".*?\"", " name=\"" + name + "\"");
View Full Code Here

          String type = propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "type");
          String path = propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path");

          if(path == null)
          {
            LanguageVO langaugeVO = LanguageDeliveryController.getLanguageDeliveryController().getMasterLanguageForSiteNode(getDatabase(), templateController.getSiteNodeId());
            if(propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + langaugeVO.getLanguageCode()) != null)
              path = propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + langaugeVO.getLanguageCode());
          }

          //logger.info("path:" + "path_" + locale.getLanguage() + ":" + propertyElement.attributeValue("path_" + locale.getLanguage()));
          if(propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + locale.getLanguage()) != null)
            path = propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + locale.getLanguage());

          if(path == null || path.equals(""))
          {
            logger.info("Falling back to content master language 1 for property:" + propertyName);
            LanguageVO contentMasterLangaugeVO = LanguageDeliveryController.getLanguageDeliveryController().getMasterLanguageForRepository(getDatabase(), contentVO.getRepositoryId());
            if(propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + contentMasterLangaugeVO.getLanguageCode()) != null)
              path = propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + contentMasterLangaugeVO.getLanguageCode())
          }
         
          Map property = new HashMap();
          property.put("name", propertyName);
          property.put("path", path);
View Full Code Here

          String type = propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "type");
          String path = propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path");

          if(path == null)
          {
            LanguageVO langaugeVO = LanguageDeliveryController.getLanguageDeliveryController().getMasterLanguageForSiteNode(getDatabase(), templateController.getSiteNodeId());
            if(propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + langaugeVO.getLanguageCode()) != null)
              path = propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + langaugeVO.getLanguageCode());
          }

          //logger.info("path:" + "path_" + locale.getLanguage() + ":" + propertyElement.attributeValue("path_" + locale.getLanguage()));
          if(propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + locale.getLanguage()) != null)
            path = propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + locale.getLanguage());
          //logger.info("path:" + path);

          if(path == null || path.equals(""))
          {
            logger.info("Falling back to content master language 2 for property:" + propertyName);
            LanguageVO contentMasterLangaugeVO = LanguageDeliveryController.getLanguageDeliveryController().getMasterLanguageForRepository(getDatabase(), contentVO.getRepositoryId());
            if(propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + contentMasterLangaugeVO.getLanguageCode()) != null)
              path = propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + contentMasterLangaugeVO.getLanguageCode())
          }

          Map property = new HashMap();
          property.put("name", propertyName);
          property.put("path", path);
View Full Code Here

              String type = propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "type");
              String path = propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path");
     
              if(path == null)
              {
                LanguageVO langaugeVO = LanguageDeliveryController.getLanguageDeliveryController().getMasterLanguageForSiteNode(getDatabase(), templateController.getSiteNodeId());
                if(propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + langaugeVO.getLanguageCode()) != null)
                  path = propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + langaugeVO.getLanguageCode());
              }
               
              if(propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + locale.getLanguage()) != null)
                path = propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + locale.getLanguage());
         
              if(path == null || path.equals(""))
              {
                logger.info("Falling back to content master language 1 for property:" + propertyName);
                LanguageVO contentMasterLangaugeVO = LanguageDeliveryController.getLanguageDeliveryController().getMasterLanguageForRepository(getDatabase(), contentVO.getRepositoryId());
                if(propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + contentMasterLangaugeVO.getLanguageCode()) != null)
                  path = propertyElement.getAttributeValue(propertyElement.getNamespaceName(), "path_" + contentMasterLangaugeVO.getLanguageCode())
              }
             
              Map property = new HashMap();
              property.put("name", propertyName);
              property.put("path", path);
View Full Code Here

      Iterator languageIterator = languages.iterator();
      int index = 0;
      int languageIndex = index;
      while(languageIterator.hasNext())
      {
        LanguageVO languageVO = (LanguageVO)languageIterator.next();
        if(languageVO.getLanguageId().intValue() == languageId.intValue())
        {
          sb.append("          <option value=\"" + languageVO.getLanguageId() + "\" selected>" + languageVO.getName() + "</option>");
          languageIndex = index;
        }
        else
        {
          sb.append("          <option value=\"" + languageVO.getLanguageId() + "\">" + languageVO.getName() + "</option>");
        }
        index++;
      }
 
      sb.append("      </select>");
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.