Package org.silverpeas.core.cmis.model
Class CmisObjectFactory
- java.lang.Object
-
- org.silverpeas.core.cmis.model.CmisObjectFactory
-
-
Constructor Summary
Constructors Constructor Description CmisObjectFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Application
createApplication(ComponentInstLight component, String language)
Creates a CMIS representation of the specified Silverpeas application.ContributionFolder
createContributionFolder(NodeDetail node, String language)
Creates a CMIS representation of the specified node descriptor in a given Silverpeas application.DocumentFile
createDocument(SimpleDocument document, ContributionIdentifier parentId)
Creates a CMIS representation of the specified localized document attached to the specified contribution.Publication
createPublication(PublicationDetail pub, ContributionIdentifier folder, String language)
Creates a CMIS representation of the specified publication in a given folder of a Silverpeas application.Space
createRootSpace(String language)
Creates the root space in the CMIS model.Space
createSpace(SpaceInstLight space, String language)
Creates a CMIS representation of the specified Silverpeas workspace.static CmisObjectFactory
getInstance()
Gets an instance of theCmisObjectFactory
class.
-
-
-
Method Detail
-
getInstance
public static CmisObjectFactory getInstance()
Gets an instance of theCmisObjectFactory
class. This method invokes the underlying IoC system to get such an instance.- Returns:
- a
CmisObjectFactory
instance.
-
createRootSpace
public Space createRootSpace(String language)
Creates the root space in the CMIS model. It is the root of the CMIS organizational tree of CMIS objects. It corresponds in Silverpeas to the container of all root workspaces.- Returns:
- the root space.
-
createSpace
public Space createSpace(SpaceInstLight space, String language)
Creates a CMIS representation of the specified Silverpeas workspace.- Parameters:
space
- a Silverpeas space.language
- the language to use in the localization of the CMIS object to construct.- Returns:
- a CMIS space as a CMIS folder.
-
createApplication
public Application createApplication(ComponentInstLight component, String language)
Creates a CMIS representation of the specified Silverpeas application.- Parameters:
component
- a component instance in Silverpeas.language
- the language to use in the localization of the CMIS object to construct.- Returns:
- a CMIS application as a CMIS folder.
-
createContributionFolder
public ContributionFolder createContributionFolder(NodeDetail node, String language)
Creates a CMIS representation of the specified node descriptor in a given Silverpeas application. A node is a technical object used in Silverpeas to categorize or organize in a generic way any user contributions. Because a node can also contain others nodes, the nodes can be linked to each of them within a tree of nodes (hence the namenode
).- Parameters:
node
- a descriptor about a node.language
- the language to use in the localization of the CMIS object to construct.- Returns:
- a CMIS contribution folder as a CMIS folder.
-
createPublication
public Publication createPublication(PublicationDetail pub, ContributionIdentifier folder, String language)
Creates a CMIS representation of the specified publication in a given folder of a Silverpeas application. A publication in our CMIS implementation is always contained into a folder. If the application in Silverpeas doesn't organize them in folders, then the folder here should be a virtual one (a root folder).- Parameters:
pub
- detail about the publication.folder
- the folder in which is contained this publication.language
- the language to use in the localization of the CMIS object to construct.- Returns:
- a CMIS publication as a CMIS folder.
-
createDocument
public DocumentFile createDocument(SimpleDocument document, ContributionIdentifier parentId)
Creates a CMIS representation of the specified localized document attached to the specified contribution.- Parameters:
document
- aSimpleDocument
instance.parentId
- the unique identifier of a contribution.- Returns:
- a CMIS document attached to a contribution.
-
-