Package org.infoglue.cms.entities.management

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


    beginTransaction(db);
       
    try
        {       
      ContentVersion contentVersion = this.getContentVersionWithId(contentVersionId, db);
        Language language = LanguageController.getController().getLanguageWithId(languageId, db);
     
      contentVersion.setLanguage((LanguageImpl)language);
     
      commitTransaction(db);           
        }
View Full Code Here


      Collection repositoryLanguages = repositoryRead.getRepositoryLanguages();
      Iterator repositoryLanguagesIterator = repositoryLanguages.iterator();
      while(repositoryLanguagesIterator.hasNext())
      {
        RepositoryLanguage repositoryLanguage = (RepositoryLanguage)repositoryLanguagesIterator.next();
        Language originalLanguage = repositoryLanguage.getLanguage();
       
        Language language = LanguageController.getController().getLanguageWithCode(originalLanguage.getLanguageCode(), db);
        if(language == null)
        {
            db.create(originalLanguage);
            language = originalLanguage;
        }
       
        repositoryLanguage.setLanguage(language);
        repositoryLanguage.setRepository(repositoryRead);

        db.create(repositoryLanguage);
       
        logger.info("language:" + language);
        logger.info("language.getRepositoryLanguages():" + language.getRepositoryLanguages());
        language.getRepositoryLanguages().add(repositoryLanguage);
      }
     
      readSiteNode.setRepository((RepositoryImpl)repositoryRead);
     
      logger.info("***************************************\nreadContent:" + readContent.getName());
View Full Code Here

      Collection repositoryLanguages = repositoryRead.getRepositoryLanguages();
      Iterator repositoryLanguagesIterator = repositoryLanguages.iterator();
      while(repositoryLanguagesIterator.hasNext())
      {
        RepositoryLanguage repositoryLanguage = (RepositoryLanguage)repositoryLanguagesIterator.next();
        Language originalLanguage = repositoryLanguage.getLanguage();
       
        Language language = LanguageController.getController().getLanguageWithCode(originalLanguage.getLanguageCode(), db);
        if(language == null)
        {
            db.create(originalLanguage);
            language = originalLanguage;
        }
       
        repositoryLanguage.setLanguage(language);
        repositoryLanguage.setRepository(repositoryRead);

        db.create(repositoryLanguage);
       
        logger.info("language:" + language);
        logger.info("language.getRepositoryLanguages():" + language.getRepositoryLanguages());
        language.getRepositoryLanguages().add(repositoryLanguage);
      }
     
      readSiteNode.setRepository((RepositoryImpl)repositoryRead);
     
      logger.info("***************************************\nreadContent:" + readContent.getName());
View Full Code Here

    //Collection contentVersions = content.getContentVersions();
    Iterator contentVersionsIterator = contentVersions.iterator();
    while(contentVersionsIterator.hasNext())
    {
      ContentVersion contentVersion = (ContentVersion)contentVersionsIterator.next();
      Language language = LanguageController.getController().getLanguageWithCode(contentVersion.getLanguage().getLanguageCode(), db);
      logger.info("Creating contentVersion for language:" + contentVersion.getLanguage().getLanguageCode() + " on content " + content.getName());

      contentVersion.setOwningContent((ContentImpl)content);
      contentVersion.setLanguage((LanguageImpl)language);
     
View Full Code Here

TOP

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

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.