public interface CentraSiteObjectManager
CentraSiteObject
s. Using this manager we can perform several operations.
CentraSiteObject
based on the given CentraSiteObjectType
.CentraSiteObject
based on the given unique identifier.CentraSiteObject
s.CentraSiteObject
s.CentraSiteRegistryObject
.CentraSiteRegistryObject
.CentraSiteSession
. The following is the sample code
which will give you the reference to CentraSiteObjectManager.
CentraSiteServiceFactory
csServiceFactory = CentraSiteServiceFactory
.getInstance();
CentraSiteService
centraSiteService = csServiceFactory.createService();
CentraSiteSession
session = centraSiteService.createSession();
CentraSiteObjectManager
centraSiteObjectManager = session.getCentraSiteObjectManager();
Modifier and Type | Method and Description |
---|---|
Category |
createCategory(java.lang.String parentKey,
java.lang.String name,
java.lang.String description)
Create a
Category with given name and description. |
Gateway |
createGateway(CentraSiteObjectType csoType)
Create the Gateway Object for the given
CentraSiteObjectType . |
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. |
java.util.HashMap<CentraSiteRegistryObject,java.util.Collection<CentraSiteRegistryObject>> |
createNewVersion(CentraSiteRegistryObject csomRegistryObject)
Creates a new version of the given object.
|
java.util.HashMap<CentraSiteRegistryObject,java.util.Collection<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 . |
Policy |
createPolicy(PolicyType policyType)
Create a Policy of given type.
|
CentraSitePolicyActionInstance |
createPolicyActionInstance(java.lang.String policyActionTemplateId)
Returns the PolicyActionInstance created by the given PolicyActionTemplateid.
|
Taxonomy |
createTaxonomy(java.lang.String name,
java.lang.String description,
boolean browsable)
Create a browsable
Taxonomy with given name and description. |
void |
deleteObjects(java.util.Collection<CentraSiteObject> csoList)
Delete the registry objects associated with the corresponding CentraSiteObject.
|
void |
deleteObjectsById(java.util.Collection<java.lang.String> idList)
Delete the registry objects associated with the corresponding the identifiers.
|
CentraSiteObject |
fetchObjectFromDb(java.lang.String id)
Removes the object in the cache and reloads it by fetching the object from the Database.
|
java.util.Collection<CentraSiteRegistryObject> |
getConsumers(java.lang.String csroId)
Return the list of consumers associated with the given asset.
|
CentraSiteRepositoryFolder |
getDefaultRepositoryFolder(CentraSiteObject centraSiteObject)
Return the DefaultRepositoryFolder based on the given
CentraSiteObject . |
java.util.List<Gateway> |
getDeployedGateways(java.lang.String csroId)
Return the list of gateways where given asset is deployed.
|
java.util.List<Target> |
getDeployedTargets(java.lang.String csroId)
Deprecated.
Use getDeployedGateways
Return the list of targets where given asset is deployed.
|
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.
|
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 | +------------------+ +-----------------+ | V +-----------------+ | centrasite2.txt | +-----------------+ In case of the above folder structure, getFolders("/projects", "centrasite") returns folder "/projects/centrasite1". |
Gateway |
getGateway(java.lang.String key)
Populate the Gateway Object persisted using the given Unique Id.
|
CentraSiteObject |
getNativeRegObject(CentraSiteObjectType csoType,
javax.xml.registry.infomodel.RegistryObject rObj)
This method returns the
CentraSiteObject from a given RegistryObject . |
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.
|
java.util.Collection<Policy> |
getPolicies(PolicyType csoPolicyType)
Gets the policies of the given type
|
Policy |
getPolicy(java.lang.String policyId)
get the Policy by given identifier
|
CentraSitePolicyActionInstance |
getPolicyActionInstance(java.lang.String policyActionInstanceId)
Return an existing PolicyActionInstance based on the policyActionInstance identifier.
|
CentraSitePolicyActionTemplate |
getPolicyActionTemplate(java.lang.String policyActionTemplateId)
Return PolicyActionTemplate by the given PolicyActionTemplateId.
|
java.util.Collection<Group> |
getRegisteredGroups(java.lang.String searchFilter)
Returns the groups registered with CentraSite from the internal repository using the specified search filter.
|
java.util.Collection<Group> |
getRegisteredGroups(java.lang.String searchFilter,
java.lang.String userId)
Returns the Groups registered with CentraSite, except for the ones already assigned to the given userId with the specified search filter.
|
java.util.Collection<Role> |
getRegisteredRoles(java.lang.String searchFilter)
Returns the Registered Roles from the internal repository using the specified search filter.
|
java.util.Collection<Role> |
getRegisteredRoles(java.lang.String searchFilter,
java.lang.String userId)
Returns the roles registered with CentraSite, except for the ones already assigned to the given userId (could be group id or user id) with the specified search filter.
|
java.util.Collection<CentraSiteRegistryObject> |
getRuntimeEventTypes()
Return the list of RuntimeEvent Types.
|
java.util.Collection<Group> |
getUnRegisteredGroups(java.lang.String searchFilter)
Returns the unregistered external groups from the external repository using the specified search filter.
|
java.util.Collection<User> |
getUnRegisteredUsers(java.lang.String searchFilter)
Returns the external users from the external repository using the specified search filter.
|
void |
purgeVersions(CentraSiteRegistryObject csomRegistryObject)
Purges the previous versions of the given object.
|
void |
saveObjects(java.util.Collection<CentraSiteObject> csoList)
Persists the given collection of CentraSiteObjects.
|
Taxonomy createTaxonomy(java.lang.String name, java.lang.String description, boolean browsable) throws CLLException
Taxonomy
with given name and description.name
- The name of taxonomy.description
- The description of taxonomy.browsable
- Is the taxonomy browsable.Taxonomy
.CLLException
- thrown in case of a failure to create the ClassificationScheme.Category createCategory(java.lang.String parentKey, java.lang.String name, java.lang.String description) throws CLLException
Category
with given name and description.parentKey
- The key of the parent Taxonomy
or Category
.name
- The name of category.description
- The description of category.Category
.CLLException
- thrown in case of a failure to create the Concept.CentraSiteObject getObject(java.lang.String id) throws CLLException
id
- Identifier which is used to identify the registry object.CentraSiteObject
that wraps the Registry Object.CLLException
- If CLL fails to populate the CentraSiteRegistryObject
of the given identifier.CentraSiteObject fetchObjectFromDb(java.lang.String id) throws CLLException
id
- The UUID key for the object to be fetched from the DB.CentraSiteObject
instance fetched from the databaseCLLException
- If an error occurs while trying to clear the object from the cache and fetching from DB.java.util.Collection<CentraSiteObject> getObjects(java.util.List<java.lang.String> ids) throws CLLException
ids
- Identifiers used to identify the registry objects.Collection
of CentraSiteObject
s that wrap the Registry Object.CLLException
- If CLL fails to populate the CentraSiteRegistryObject of the given identifier.CentraSiteObject createObject(CentraSiteObjectType csoType) throws CLLException
CentraSiteObjectType
.csoType
- Type representation for CentraSiteObjectCentraSiteObject
created for the given typeCLLException
- If CLL fails to create the CentraSiteObject of the given type.Gateway createGateway(CentraSiteObjectType csoType) throws CLLException
CentraSiteObjectType
.csoType
- Type representation for CentraSiteObjectGateway
created for the given typeCLLException
- If CLL fails to create the Gateway of the given type.Gateway getGateway(java.lang.String key) throws CLLException
id
- Identifier which is used to identify the Gateway.Gateway
that wraps the Registry Object.CLLException
- If CLL fails to populate the Gateway
of the given identifier.void deleteObjects(java.util.Collection<CentraSiteObject> csoList) throws CLLException
csoList
- Collection
of CentraSiteObject
s to deleteCLLException
- If CLL fails to delete any one of the CentraSiteObject.void deleteObjectsById(java.util.Collection<java.lang.String> idList) throws CLLException
idList
- Collection
of CentraSiteObject unique identifiersCLLException
- If CLL fails to delete any one of the CentraSiteObjects.void saveObjects(java.util.Collection<CentraSiteObject> csoList) throws CLLException
csoList
- Collection
of CentraSiteObject
s to saveCLLException
- If CLL fails to save any one of the CentraSiteObjects.CentraSiteInternationalString createInternationalString() throws CLLException
CentraSiteInternationalString
instanceCLLException
- If CLL fails to create a CentraSiteInternationalString.CentraSiteInternationalString createInternationalString(java.lang.String value) throws CLLException
CentraSiteInternationalString
with the specified value and default locale.value
- The value for the international stringCentraSiteInternationalString
instance with the specified value and default locale.CLLException
- If CLL fails to create a CentraSiteInternationalString with the specified value and default locale.CentraSiteInternationalString createInternationalString(java.util.Locale locale, java.lang.String value) throws CLLException
locale
- The Locale
for the stringvalue
- The value for the international stringCentraSiteInternationalString
instance created with the specified locale and value.CLLException
- If CLL fails to create a CentraSiteInternationalString with the specified locale and value.CentraSiteLocalizedString createLocalizedString(java.util.Locale locale, java.lang.String value) throws CLLException
CentraSiteLocalizedString
instance with the specified Locale and string parameters.locale
- The Locale
for the localized stringvalue
- The value for the localized stringCentraSiteLocalizedString
instance created with the specified Locale and string parameters.CLLException
- If CLL fails to create a CentraSiteInternationalString instance with the specified Locale and string parameters.CentraSiteLocalizedString createLocalizedString(java.util.Locale locale, java.lang.String value, java.lang.String charSetName) throws CLLException
CentraSiteLocalizedString
instance with the specified Locale, string, and character set parameters.locale
- The Locale
for the localized stringvalue
- The value for the localized stringcharSetName
- The charset for the localized stringCentraSiteLocalizedString
instance created with the specified Locale, string, and character set parameters.CLLException
- If CLL fails to create a CentraSiteLocalizedString instance with the specified Locale, string, and character set parameters.java.util.HashMap<CentraSiteRegistryObject,java.util.Collection<CentraSiteRegistryObject>> createNewVersion(CentraSiteRegistryObject csomRegistryObject, java.lang.String userVersion, Organization org, boolean propagateVersion, java.lang.String changeLog, java.lang.String nameSpace) throws CLLException
csomRegistryObject
- Reference to CentraSiteRegistryObject
which needs to be versioneduserVersion
- User specified version number for the newly versioned objectorg
- Organization
for the newly versioned objectpropagateVersion
- Boolean flag indicating whether version change needs to be propagated to its dependent objects or not.changeLog
- Comments (if any) while creating new versionnameSpace
- The namespace for the newly versioned registry objectHashMap
containing the newly versioned registry object as the key and a Collection
of CentraSiteRegistryObject
instances as the value which are the dependent objects which are versioned (This is based on
the propagateVersion flag)CLLException
- If creation of a new Versioned registry object failsjava.util.HashMap<CentraSiteRegistryObject,java.util.Collection<CentraSiteRegistryObject>> createNewVersion(CentraSiteRegistryObject csomRegistryObject) throws CLLException
csomRegistryObject
- Reference to registry object that needs to be versionedHashMap
containing the newly versioned registry object as the key and a Collection
of CentraSiteRegistryObject
instances as the value which are the dependent objects which are versioned (This is based on
the propagateVersion flag)CLLException
- If creation of a new Versioned registry object failsvoid purgeVersions(CentraSiteRegistryObject csomRegistryObject) throws CLLException
csomRegistryObject
- The CentraSiteRegistryObject
whose older versions needs to be purged.CLLException
- If CLL fails to purge the previous versions of the given object.java.util.Collection<CentraSiteRepositoryFile> getFiles(java.lang.String baseFolderRelativePath, java.lang.String fileNamePattern) throws CLLException
+------------------+ | projects | +------------------+ | +------------------+ +-----------------+ | centrasite1 | --> | centrasite3.txt | +------------------+ +-----------------+ | V +-----------------+ | centrasite2.txt | +-----------------+
In case of the above folder structure getFiles("/projects", "centrasite") returns files:
baseFolderRelativePath
- Relative path of the WebDAV folder i.e "/projects/SupportingDocuments/", if the value is null throws CLLException.fileNamePattern
- Name looking for a folder that exists inside the baseFolder. If the value is null throw CLLException. In case of empty value, return all folders in the given baseFolder.Collection
of CentraSiteRepositoryFile
instances which matches the given fileNamePatternCLLException
- In case the given inputs are incorrect.java.util.Collection<CentraSiteRepositoryFolder> getFolders(java.lang.String baseFolderRelativePath, java.lang.String folderNamePattern) throws CLLException
+------------------+ | projects | +------------------+ | +------------------+ +-----------------+ | centrasite1 | --> | centrasite3.txt | +------------------+ +-----------------+ | V +-----------------+ | centrasite2.txt | +-----------------+
In case of the above folder structure, getFolders("/projects", "centrasite") returns folder "/projects/centrasite1". Even though there are files which contain the matching pattern, they are not included.
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(s) in the given baseFolder.Collection
of CentraSiteRepositoryFolder
instances which matches the given fileNamePatternCLLException
- In case the given inputs are incorrect.CentraSiteRepositoryFolder getDefaultRepositoryFolder(CentraSiteObject centraSiteObject) throws CLLException
CentraSiteObject
.
If the logged in user has permissions to create the folder in the given
asset's organization folder then return,
"/Projects/SupportingDocumentLibaray/centraSiteObject
- CentraSiteObject
for which the file repository resource needs to be createdCentraSiteRepositoryFolder
pointing to the location where the user can upload files.CLLException
- In case of a failure to get the DefaultRepositoryFolder for the given CentraSiteObject.java.util.List<Gateway> getDeployedGateways(java.lang.String csroId) throws CLLException
csroId
- Registry object identifierList
of Gateway
s on which given the asset is deployed, empty list in case no gateways are found.CLLException
- If an error occurs in the process of finding the gateway for the given id.java.util.List<Target> getDeployedTargets(java.lang.String csroId) throws CLLException
csroId
- Registry object identifierList
of Target
s on which given the asset is deployed, empty list in case no gateways are found.CLLException
- If an error occurs in the process of finding the target for the given id.java.util.Collection<CentraSiteRegistryObject> getRuntimeEventTypes() throws CLLException
Collection
of CentraSiteRegistryObject
instancesCLLException
- If an error occurs in case of a failure to populate the runtime event types.java.util.Collection<CentraSiteRegistryObject> getConsumers(java.lang.String csroId) throws CLLException
csroId
- Asset to which consumers are associated.Collection
of consumers as CentraSiteRegistryObject
s associated to the given asset.CLLException
- In case of a failure to populate the consumers for the given asset.java.util.Collection<User> getUnRegisteredUsers(java.lang.String searchFilter) throws CLLException
searchFilter
- The search filter to search for the unregistered users. Wild card character "*" can be used in the search filter.Collection
of unregistered User
objects. Since these users are not registered, CentraSiteObject.getId()
will give the user alias/common name, instead of the UUID key.CLLException
- If an error occurs while trying to fetch the collection of unregistered users.CentraSitePolicyActionInstance createPolicyActionInstance(java.lang.String policyActionTemplateId) throws CLLException
policyActionTemplateId
- Policy action template identifier to create the Policy action instanceCentraSitePolicyActionInstance
created with the given policyActionTemplateIdCLLException
- In case of a failure to create the policyActionInstance.CentraSitePolicyActionTemplate getPolicyActionTemplate(java.lang.String policyActionTemplateId) throws CLLException
policyActionTemplateId
- Policy action template identifierCentraSitePolicyActionTemplate
corresponding to the given policyActionTemplateIdCLLException
- In case of a failure to get the PolicyActionTemplate instanceCentraSitePolicyActionInstance getPolicyActionInstance(java.lang.String policyActionInstanceId) throws CLLException
policyActionInstanceId
- PolicyActionInstance identifierCentraSitePolicyActionInstance
corresponding to the given policyActionInstanceId and null in case a PolicyAction instance does not exist with the given idCLLException
- In case of a failure to get the CentraSitePolicyActionInstancejava.util.Collection<Group> getUnRegisteredGroups(java.lang.String searchFilter) throws CLLException
searchFilter
- The search filter to search for the unregistered groups. Wild card character "*" can be used in the search filter.Collection
of unregistered Group
instances that match the given search filter. Since
the group is unregistered, Group.getId()
will return the group name and not the UUID key.CLLException
- If an error occurs while trying to search for the unregistered groupsjava.util.Collection<Group> getRegisteredGroups(java.lang.String searchFilter) throws CLLException
searchFilter
- The search filter to search for the groups. Wild card character "*" can be used in the search filter.Collection
of registered Group
instances that match the given search filter.CLLException
- If an error occurs while trying to fetch registered groupsjava.util.Collection<Group> getRegisteredGroups(java.lang.String searchFilter, java.lang.String userId) throws CLLException
searchFilter
- The search filter to search for the groups. Wild card character "*" can be used in the search filter.userId
- The user id to which the group(s) should not be assigned alreadyCollection
of Group
instances matching the given searchFilter and those that do not have the given userId as a memberCLLException
- If an error occurs while trying to fetch the registered groupsjava.util.Collection<Role> getRegisteredRoles(java.lang.String searchFilter, java.lang.String userId) throws CLLException
searchFilter
- The search filter to search for the roles. Wild card character "*" can be used in the search filter.userId
- The user or group id to which the role(s) should not be assigned alreadyCollection
of Role
instances matching the given searchFilter and those that are not assigned to the given userIdCLLException
- If an error occurs while trying to fetch the registered rolesjava.util.Collection<Role> getRegisteredRoles(java.lang.String searchFilter) throws CLLException
searchFilter
- The search filter to search for the roles. Wild card character "*" can be used in the search filter.Collection
of Role
instances matching the given searchFilterCLLException
- If an error occurs while trying to fetch the registered rolesPolicy createPolicy(PolicyType policyType) throws CLLException
policyType
- the type of policy i.e DesignTime, RuntimePolicy
CLLException
- failed to create the given type of PolicyPolicy getPolicy(java.lang.String policyId) throws CLLException
policyId
- unique identifier of the PolicyPolicy
CLLException
- failed to get the policy by given identifierjava.util.Collection<Policy> getPolicies(PolicyType csoPolicyType) throws CLLException
csoPolicyType
- the type of policy i.e DesignTime, RuntimeCLLException
- in case of failed to get the given typeCentraSiteObject getNativeRegObject(CentraSiteObjectType csoType, javax.xml.registry.infomodel.RegistryObject rObj) throws CLLException
CentraSiteObject
from a given RegistryObject
.
This is needed to obtain the CLL object prior to persistence.csoType
- The CentraSiteObjectType
indicating the object typerObj
- The RegistryObject
instanceCentraSiteObject
that corresponds to the given RegistryObject
CLLException
- If an error occurs while getting the CLL object from the JAXR object