Package org.infoglue.cms.applications.common

Examples of org.infoglue.cms.applications.common.VisualFormatter


        beginTransaction(db);

        try
        {
          String filePath = CmsPropertyHandler.getDigitalAssetPath();
          String archiveFileName = "assetArchive" + new VisualFormatter().formatDate(new Date(), "yyyy-MM-dd_HH-mm") + ".zip";
      File outputFile = new File(filePath + File.separator + archiveFileName);

          String[] filenames = new String[digitalAssetIdStrings.length];
          Map names = new HashMap();
         
View Full Code Here


    return assetFolderFile;
  }

  public String getAssetFileName(DigitalAssetVO digitalAssetVO, Integer contentId, Integer languageId, Database db) throws Exception
  {
    VisualFormatter formatter = new VisualFormatter();
    String fileName = digitalAssetVO.getDigitalAssetId() + "_" + formatter.replaceNiceURINonAsciiWithSpecifiedChars(digitalAssetVO.getAssetFileName(), CmsPropertyHandler.getNiceURIDefaultReplacementCharacter());

    if(CmsPropertyHandler.getAssetFileNameForm().equals("contentId_languageId_assetKey"))
    {
      if(contentId == null || languageId == null)
      {
        DigitalAsset asset = DigitalAssetController.getMediumDigitalAssetWithIdReadOnly(digitalAssetVO.getId(), db);
        if(asset.getContentVersions() != null && asset.getContentVersions().size() > 0)
        {
          ContentVersion cv = (ContentVersion)asset.getContentVersions().iterator().next();
          contentId = cv.getValueObject().getContentId();
          languageId = cv.getValueObject().getLanguageId();
        }
      }

      String assetFileName = digitalAssetVO.getAssetFileName();
      String suffix = "";
      int endingStartIndex = assetFileName.lastIndexOf(".");
      if(endingStartIndex > -1)
        suffix = assetFileName.substring(endingStartIndex);

      fileName = "" + contentId + "_" + languageId + formatter.replaceNiceURINonAsciiWithSpecifiedChars(digitalAssetVO.getAssetKey(), CmsPropertyHandler.getNiceURIDefaultReplacementCharacter()) + suffix;
    }

    return fileName;
  }
View Full Code Here

      List contentTypeDefinitions = ContentTypeDefinitionController.getController().getContentTypeDefinitionList(db);
      List categories = CategoryController.getController().getAllActiveCategories();
     
      InfoGlueExportImpl infoGlueExportImpl = new InfoGlueExportImpl();
     
      VisualFormatter visualFormatter = new VisualFormatter();
      names = new VisualFormatter().replaceNonAscii(names, '_');

      if(repositories.length > 2 || names.length() > 40)
        names = "" + repositories.length + "_repositories";
     
      String fileName = "Export_" + names + "_" + visualFormatter.formatDate(new Date(), "yyyy-MM-dd_HHmm") + ".xml";
      if(exportFileName != null && !exportFileName.equals(""))
        fileName = exportFileName;
     
      String filePath = CmsPropertyHandler.getDigitalAssetPath();
      String fileSystemName =  filePath + File.separator + fileName;
View Full Code Here

    public String doSendMessage() throws Exception
    {
      if(getInfoGluePrincipal() == null)
        return ERROR;
     
      VisualFormatter vf = new VisualFormatter();
      String convertedMessage = this.message.replaceAll("(\r\n|\n\r|\r|\n)", "<br />");;
      convertedMessage = vf.escapeJSON(convertedMessage).replaceAll("\"", "");
     
      chat.addMessage(this.getUserName(), CHAT_MESSAGE_TYPE, convertedMessage);
      if(this.isSystemMessage)
      {
          systemMessagesChat.addMessage(this.getUserName(), SYSTEM_MESSAGE_TYPE, "openChat('" + convertedMessage + "');");
View Full Code Here

      List contentTypeDefinitions = ContentTypeDefinitionController.getController().getContentTypeDefinitionList(db);
      List categories = CategoryController.getController().getAllActiveCategories();
     
      InfoGlueExportImpl infoGlueExportImpl = new InfoGlueExportImpl();
     
      VisualFormatter visualFormatter = new VisualFormatter();
      names = new VisualFormatter().replaceNonAscii(names, '_');

      String fileName = "RepositoryCopy_" + names + "_" + visualFormatter.formatDate(new Date(), "yyyy-MM-dd_HHmm") + ".xml";
     
      String filePath = CmsPropertyHandler.getDigitalAssetPath();
      String fileSystemName =  filePath + File.separator + fileName;
     
      String encoding = "UTF-8";
View Full Code Here

    this.contentVO.setIsProtected(isProtected);
  }

    public void setPublishDateTime(String publishDateTime)
    {
         this.contentVO.setPublishDateTime(new VisualFormatter().parseDate(publishDateTime, "yyyy-MM-dd HH:mm"));
    }
View Full Code Here

         this.contentVO.setPublishDateTime(new VisualFormatter().parseDate(publishDateTime, "yyyy-MM-dd HH:mm"));
    }

    public void setExpireDateTime(String expireDateTime)
    {
         this.contentVO.setExpireDateTime(new VisualFormatter().parseDate(expireDateTime, "yyyy-MM-dd HH:mm"));
  }
View Full Code Here

    if(startTagIndex > 0 && startTagIndex < xml.length() && endTagIndex > startTagIndex && endTagIndex <  xml.length())
    {
      value = xml.substring(startTagIndex + attributeName.length() + 11, endTagIndex);
      if(escapeHTML)
        value = new VisualFormatter().escapeHTML(value);
    }   

    return value;
  }
View Full Code Here

        return this.contentVO.getName();
    }

     public String getPublishDateTime()
    {       
        return new VisualFormatter().formatDate(this.contentVO.getPublishDateTime(), "yyyy-MM-dd HH:mm");
    }
View Full Code Here

        return new VisualFormatter().formatDate(this.contentVO.getPublishDateTime(), "yyyy-MM-dd HH:mm");
    }
       
    public String getExpireDateTime()
    {
        return new VisualFormatter().formatDate(this.contentVO.getExpireDateTime(), "yyyy-MM-dd HH:mm");
    }
View Full Code Here

TOP

Related Classes of org.infoglue.cms.applications.common.VisualFormatter

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.