com.softwareag.centrasite.api.csom
Interface CentraSiteObjectManager


public interface CentraSiteObjectManager

CentraSiteObjectManager is used to manage the CentraSiteObjects, using this manager we can perform the operations like
1) Create the CentraSiteObject based on the given CentraSiteObjectType.

2) Retrieve the CentraSiteObject based on the given unique identifier.

3) Save/update one or more CentraSiteObject's.

4) Delete one or more CentraSiteObject's.

5) Create a new version of the CentraSiteRegistryObject.

6) Purge older versions of the CentraSiteRegistryObject.

CentraSiteObjectManager instantiated by the CentraSiteObjectFactory, the following is the sample code which will give you the reference to CentraSiteObjectManager.
CentraSiteObjectFacotry centraSiteObjectFactory = CentraSiteObjectFactory.getInstance(CentraSiteConnection); CentraSiteObjectManager centraSiteObjectManager = centraSiteObjectFactory.getCentraSiteObjectManager();


Method Summary
 CentraSiteInternationalString createInternationalString()
          Creates an empty CentraSiteInternationalString.
 CentraSiteInternationalString createInternationalString(java.util.Locale locale, java.lang.String value)
          Creates an empty CentraSiteInternationalString with the specified locale and value.
 CentraSiteInternationalString createInternationalString(java.lang.String value)
          Creates an empty CentraSiteInternationalString with the specified value and default locale.
 CentraSiteLocalizedString createLocalizedString(java.util.Locale locale, java.lang.String value)
          Creates a CentraSiteLocalizedString instance with the specified Locale and string parameters.
 CentraSiteLocalizedString createLocalizedString(java.util.Locale locale, java.lang.String value, java.lang.String charSetName)
          Creates a CentraSiteLocalizedString instance with the specified Locale, string, and character set parameters.
 CentraSiteRegistryObject createNewVersion(CentraSiteRegistryObject csomRegistryObject)
          Creates a new version of the given object.
 CentraSiteRegistryObject createNewVersion(CentraSiteRegistryObject csomRegistryObject, java.lang.String userVersion, Organization org, boolean propagateVersion, java.lang.String changeLog, java.lang.String nameSpace)
          Creates a new version of the given object.
 CentraSiteObject createObject(CentraSiteObjectType csoType)
          Create the CentraSiteObject for the given CentraSiteObjectType.
 void deleteObjects(java.util.Collection<CentraSiteObject> csoList)
          Delete the registry objects associated with the corresponding the CentraSiteObject
 CentraSiteRepositoryFolder getDefaultRepositoryFolder(CentraSiteObject centraSiteObject)
          return the DefaultRepositoryFolder based on the given CentraSiteObject.
 java.util.Collection<CentraSiteRepositoryFile> getFiles(java.lang.String baseFolderRelativePath, java.lang.String fileNamePattern)
          Retrieve the files nested under the given base folder which matches the specified name pattern + ----------------- + | | | projects | + ----------------- + | + ----------------- + +-----------------+ | | | | | centrasite1 | - | centrasite3.txt | + ----------------- + +-----------------+ | + ----------------- + | | | centrasite2.txt | + ----------------- + in case of the above folder structure getFiles("/projects", "centrasite") return files /projects/centrasite1/centrasite3.txt and /projects/centrasite1/centrasite2.txt even though folder also contains the matching patterns it did not include in the result.
 java.util.Collection<CentraSiteRepositoryFolder> getFolders(java.lang.String baseFolderRelativePath, java.lang.String folderNamePattern)
          Retrieve the folders nested under the given base folder and matching the specified name pattern + ----------------- + | | | projects | + ----------------- + | + ----------------- + +-----------------+ | | | | | centrasite1 | - | centrasite3.txt | + ----------------- + +-----------------+ | + ----------------- + | | | centrasite2.txt | + ----------------- + in case of the above folder structure getFolders("/projects", "centrasite") return files /projects/centrasite1 even though files contain the matching patterns it did not include.
 CentraSiteObject getObject(java.lang.String id)
          Populate the CentraSiteRegistryObject persisted using the given Unique Id.
 java.util.Collection<CentraSiteObject> getObjects(java.util.List<java.lang.String> ids)
          Populate the list of CentraSiteObjects persisted using the given identifiers.
 void purgeVersions(CentraSiteRegistryObject csomRegistryObject)
          Purges the previous versions of the given object.
 void saveObjects(java.util.Collection<CentraSiteObject> csoList)
          Persists the given list of CentraSiteObject
 

Method Detail

getObject

CentraSiteObject getObject(java.lang.String id)
                           throws CLLException
Populate the CentraSiteRegistryObject persisted using the given Unique Id.

Parameters:
id - identifier which used to identify the registry object.
Returns:
CentraSiteObject that wraps the Registry Object.
Throws:
CLLException - if CLL fails to populate the CentraSiteRegistryObject of the given identifier.

getObjects

java.util.Collection<CentraSiteObject> getObjects(java.util.List<java.lang.String> ids)
                                                  throws CLLException
Populate the list of CentraSiteObjects persisted using the given identifiers.

Parameters:
ids - identifier which used to identify the registry object.
Returns:
list of CentraSiteObjects that wrap the Registry Object.
Throws:
CLLException - if CLL fails to populate the CentraSiteRegistryObject of the given identifier.

createObject

CentraSiteObject createObject(CentraSiteObjectType csoType)
                              throws CLLException
Create the CentraSiteObject for the given CentraSiteObjectType.

Parameters:
csoType - type representation for CentraSiteObject
Returns:
CentraSiteObject
Throws:
CLLException - if CLL fails to populate the CentraSiteObject of the given type.

deleteObjects

void deleteObjects(java.util.Collection<CentraSiteObject> csoList)
                   throws CLLException
Delete the registry objects associated with the corresponding the CentraSiteObject

Parameters:
csoList - list of CentraSiteObjects
Throws:
CLLException - if CLL fails to delete any one of the CentraSiteObject.

saveObjects

void saveObjects(java.util.Collection<CentraSiteObject> csoList)
                 throws CLLException
Persists the given list of CentraSiteObject

Parameters:
csoList - list of CentraSiteObjects
Throws:
CLLException - if CLL fails to save any one of the CentraSiteObject.

createInternationalString

CentraSiteInternationalString createInternationalString()
                                                        throws CLLException
Creates an empty CentraSiteInternationalString.

Returns:
CentraSiteInternationalString
Throws:
CLLException - if CLL fails to create a CentraSiteInternationalString.

createInternationalString

CentraSiteInternationalString createInternationalString(java.lang.String value)
                                                        throws CLLException
Creates an empty CentraSiteInternationalString with the specified value and default locale.

Parameters:
value -
Returns:
CentraSiteInternationalString with the specified value and default locale.
Throws:
CLLException - if CLL fails to create a CentraSiteInternationalString with the specified value and default locale.

createInternationalString

CentraSiteInternationalString createInternationalString(java.util.Locale locale,
                                                        java.lang.String value)
                                                        throws CLLException
Creates an empty CentraSiteInternationalString with the specified locale and value.

Parameters:
locale -
value -
Returns:
CentraSiteInternationalString with the specified locale and value.
Throws:
CLLException - if CLL fails to create a CentraSiteInternationalString with the specified locale and value.

createLocalizedString

CentraSiteLocalizedString createLocalizedString(java.util.Locale locale,
                                                java.lang.String value)
                                                throws CLLException
Creates a CentraSiteLocalizedString instance with the specified Locale and string parameters.

Parameters:
locale -
value -
Returns:
CentraSiteLocalizedString instance with the specified Locale and string parameters.
Throws:
CLLException - if CLL fails to create a CentraSiteInternationalString instance with the specified Locale and string parameters.

createLocalizedString

CentraSiteLocalizedString createLocalizedString(java.util.Locale locale,
                                                java.lang.String value,
                                                java.lang.String charSetName)
                                                throws CLLException
Creates a CentraSiteLocalizedString instance with the specified Locale, string, and character set parameters.

Parameters:
locale -
value -
charSetName -
Returns:
CentraSiteLocalizedString instance with the specified Locale, string, and character set parameters.
Throws:
CLLException - if CLL fails to create a CentraSiteLocalizedString instance with the specified Locale, string, and character set parameters.

createNewVersion

CentraSiteRegistryObject createNewVersion(CentraSiteRegistryObject csomRegistryObject,
                                          java.lang.String userVersion,
                                          Organization org,
                                          boolean propagateVersion,
                                          java.lang.String changeLog,
                                          java.lang.String nameSpace)
                                          throws CLLException
Creates a new version of the given object. Parameters for version include the userVersion, org, comments for the version and whether it is a deep version or not.

Parameters:
csomRegistryObject - Reference to registry object which needs to be versioned
userVersion - userVersion number for the newly versioned object
org - Organization for the newly versioned object
propagateVersion - Boolean flag indicating whether version change neeeds to be propagated to depedent objects or not.
changeLog - comments any while creating new version
nameSpace -
Returns:
CentraSiteRegistryObject for the new version that is created just now.
Throws:
CLLException - If creation of new Version fails

createNewVersion

CentraSiteRegistryObject createNewVersion(CentraSiteRegistryObject csomRegistryObject)
                                          throws CLLException
Creates a new version of the given object. Populates organization from the given object. Defaults to deep version and no userVersion/comments.

Parameters:
csomRegistryObject - Reference to registry object that needs to be versioned
Returns:
new version of the given object.
Throws:
CLLException - if CLL fails to create a new version of the given object.

purgeVersions

void purgeVersions(CentraSiteRegistryObject csomRegistryObject)
                   throws CLLException
Purges the previous versions of the given object.

Parameters:
csomRegistryObject - list of registry objects whose older versions needs to be purged.
Throws:
CLLException - if CLL fails to purge the previous versions of the given object.

getFiles

java.util.Collection<CentraSiteRepositoryFile> getFiles(java.lang.String baseFolderRelativePath,
                                                        java.lang.String fileNamePattern)
                                                        throws CLLException
Retrieve the files nested under the given base folder which matches the specified name pattern + ----------------- + | | | projects | + ----------------- + | + ----------------- + +-----------------+ | | | | | centrasite1 | - | centrasite3.txt | + ----------------- + +-----------------+ | + ----------------- + | | | centrasite2.txt | + ----------------- + in case of the above folder structure getFiles("/projects", "centrasite") return files /projects/centrasite1/centrasite3.txt and /projects/centrasite1/centrasite2.txt even though folder also contains the matching patterns it did not include in the result.

Parameters:
baseFolderRelativePath - relative path of the webdav folder i.e /projects/SupportingDocuments/, if the value is null throw CLLException.
fileNamePattern - name that looking for the folder exists inside the baseFolder, if the value is null throw CLLException, in case of empty value return all folder in the given baseFolder.
Returns:
list of files which matches the given fileNamePattern
Throws:
CLLException - in case of the given inputs is incorrect.

getFolders

java.util.Collection<CentraSiteRepositoryFolder> getFolders(java.lang.String baseFolderRelativePath,
                                                            java.lang.String folderNamePattern)
                                                            throws CLLException
Retrieve the folders nested under the given base folder and matching the specified name pattern + ----------------- + | | | projects | + ----------------- + | + ----------------- + +-----------------+ | | | | | centrasite1 | - | centrasite3.txt | + ----------------- + +-----------------+ | + ----------------- + | | | centrasite2.txt | + ----------------- + in case of the above folder structure getFolders("/projects", "centrasite") return files /projects/centrasite1 even though files contain the matching patterns it did not include.

Parameters:
baseFolderRelativePath - relative path of the webdav folder i.e /projects/SupportingDocuments/,if the value is null throw CLLException.
folderNamePattern - name that looking for the folder exists inside the baseFolder, if the value is null throw CLLException, in case of empty value return all folder in the given baseFolder.
Returns:
list of folders which matches the given fileNamePattern
Throws:
CLLException - in case of the given inputs is incorrect.

getDefaultRepositoryFolder

CentraSiteRepositoryFolder getDefaultRepositoryFolder(CentraSiteObject centraSiteObject)
                                                      throws CLLException
return the DefaultRepositoryFolder based on the given CentraSiteObject. if the logged user have permission to create the folder in the given asset organization folder then return /Projects/SupportingDocumentLibaray/ otherwise /Projects/SupportingDocumentLibaray/

Parameters:
centraSiteObject - CentraSiteObject which the file repository resource needs to create
Returns:
CentraSiteRepositoryFolder points the location where user can upload the files.
Throws:
CLLException - in case of failed to get the DefaultRepositoryFolder for the given CentraSiteObject.