Class ImportOptions

java.lang.Object
com.jalios.jcms.mashup.ImportOptions

public class ImportOptions extends Object
This class contains the options used during an import.
Since:
jcms-5.7.3
Author:
Olivier Dedieu
  • Constructor Details

    • ImportOptions

      public ImportOptions()
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getImportWorkspace

      public Workspace getImportWorkspace()
      Returns the workspace used for new imported publications.
      Returns:
      the import workspace.
      Since:
      jcms-5.7.3
    • setImportWorkspace

      public ImportOptions setImportWorkspace(Workspace importWorkspace)
      Sets the workspace used for new imported publications. By default, ImportManager.getImportWorkspace() is used.
      Parameters:
      importWorkspace - the workspace to used for new imported publications.
      Returns:
      itself for convenient method chaining
      Since:
      jcms-5.7.3
    • getImportAuthor

      public Member getImportAuthor()
      Returns the author used for new imported publications.
      Returns:
      the import author.
      Since:
      jcms-5.7.3
    • setImportAuthor

      public ImportOptions setImportAuthor(Member importAuthor)
      Sets the author used for new imported publications. By default, ImportManager.getImportAuthor() is used.
      Parameters:
      importAuthor - the author to used for new imported publication.
      Returns:
      itself for convenient method chaining
      Since:
      jcms-5.7.3
    • isImportFiles

      public boolean isImportFiles()
      Returns true if the attached files have to be imported.
      Returns:
      true if the attached files have to be imported.
      Since:
      jcms-5.7.3
    • setImportFiles

      public ImportOptions setImportFiles(boolean importFiles)
      Indicates if the attached files have to be imported.
      Parameters:
      importFiles - if true the attached files will be imported.
      Returns:
      itself for convenient method chaining
      Since:
      jcms-5.7.3
    • isImportCategories

      public boolean isImportCategories()
      Returns true if the categories have to be imported.
      Returns:
      true if the categories have to be imported.
      Since:
      jcms-5.7.3
    • setImportCategories

      public ImportOptions setImportCategories(boolean importCategories)
      Indicates if the categories have to be imported.
      Parameters:
      importCategories - if true the categories will be imported.
      Returns:
      itself for convenient method chaining
      Since:
      jcms-5.7.3
    • isImportAsLocal

      public boolean isImportAsLocal()
      Returns true if the imported data must be convert to local data.
      Returns:
      true if the imported data must be convert to local data.
      Since:
      jcms-5.7.3
    • setImportAsLocal

      public ImportOptions setImportAsLocal(boolean importAsLocal)
      Indicates if the imported data must be converted to local data.
      Parameters:
      importAsLocal - if true the imported data will be converted to local data.
      Returns:
      itself for convenient method chaining
      Since:
      jcms-5.7.3
    • addOption

      public ImportOptions addOption(String key, Object value)
      Add a custom option.
      Parameters:
      key - the option's key.
      value - the option's value.
      Returns:
      itself for convenient method chaining
      Since:
      jcms-5.7.3
    • removeOption

      public ImportOptions removeOption(String key)
      Remove a custom option.
      Parameters:
      key - the option's key
      Returns:
      itself for convenient method chaining
      Since:
      jcms-5.7.3
    • getOption

      public Object getOption(String key)
      Returns the value of a custom option.
      Parameters:
      key - the option's key.
      Returns:
      the value of the custom option.
      Since:
      jcms-5.7.3
    • getOptionMap

      public Map getOptionMap()
      Returns the map of custom options.
      Returns:
      the map of custom options.
      Since:
      jcms-5.7.3
    • isAppendMilestone

      public boolean isAppendMilestone()
      Returns true if milestones must be append in the store before and after the import process.
      Returns:
      true if milestones must be append in the store before and after the import process.
      Since:
      jcms-5.7.3
    • setAppendMilestone

      public ImportOptions setAppendMilestone(boolean appendMilestone)
      Indicates if milestones must be append in the store before and after the import process.
      Parameters:
      appendMilestone - if true milestones will be added.
      Returns:
      itself for convenient method chaining
      Since:
      jcms-5.7.3
    • setSelfImport

      public ImportOptions setSelfImport(boolean selfImport)
      Indicates that import is being performed from data of the same webapp.

      Default value is false.
      When enabled, all Data referenced with their id will be retrieved from local webapp.

      Parameters:
      selfImport - true if will be added.
      Returns:
      itself for convenient method chaining
      Since:
      jcms-9.0.0
    • isSelfImport

      public boolean isSelfImport()
      Returns true import is being performed from data of the same webapp.

      Default value is false.
      When enabled, all Data referenced with their id will be retrieved from local webapp.

      Returns:
      true to retrieve data from local webapp, false to import data from remote information
      Since:
      jcms-9.0.0