|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.pds.registry.service.RegistryServiceImpl
@Service(value="registryService") public class RegistryServiceImpl
This class contains all the logic for publishing, versioning, updating, and deleting registry objects. The registry aims to support the registry portion of the CCSDS regrep specification at the same time it leverages the much of the ebXML information model.
Constructor Summary | |
---|---|
RegistryServiceImpl()
|
Method Summary | |
---|---|
void |
changeObjectStatus(String user,
String guid,
ObjectAction action,
Class<? extends RegistryObject> objectClass)
Changes the status of registry object with the given guid and of the given type |
void |
changeObjectStatus(String user,
String lid,
String versionId,
ObjectAction action,
Class<? extends RegistryObject> objectClass)
Changes the RegistryObject status with the given identifying
information. |
String |
configure(String user,
RegistryPackage registryPackage,
List<? extends RegistryObject> registryObjects)
Configures the registry with a list of registry objects as input. |
void |
deleteObject(String user,
String guid,
Class<? extends RegistryObject> objectClass)
Deletes a RegistryObject from the registry which share the logical
identifier and version. |
void |
deleteObject(String user,
String lid,
String versionId,
Class<? extends RegistryObject> objectClass)
Deletes a RegistryObject from the registry which share the logical
identifier and version. |
Association |
getAssocation(String guid)
Retrieves the Association from the registry with the given guid |
RegistryResponse |
getAssociations(AssociationQuery query,
Integer start,
Integer rows)
Retrieves a set of associations that match the given query. |
RegistryResponse |
getAuditableEvents(String affectedObject)
Retrieves the list of (@link AuditableEvent}'s for the affected object |
List<ClassificationNode> |
getClassificationNodes(String scheme)
Retrieves all ClassificationNode for a given
ClassificationScheme |
RegistryObject |
getEarliestObject(String lid,
Class<? extends RegistryObject> objectClass)
Retrieves the earliest version of the RegsitryObject with the given
logical identifier |
ExtrinsicObject |
getExtrinsic(String guid)
Retrieves a ExtrinsicObject from the registry |
RegistryResponse |
getExtrinsics(ExtrinsicQuery query)
Retrieves the first set of extrinsics that match the query |
RegistryResponse |
getExtrinsics(ExtrinsicQuery query,
Integer start,
Integer rows)
Retrieves a set of extinsics that match the given query. |
RegistryResponse |
getExtrinsics(Integer start,
Integer rows)
This method allows one to page through the ExtrinsicObject 's in the
registry. |
IdentifierGenerator |
getIdentifierGenerator()
|
RegistryObject |
getLatestObject(String lid,
Class<? extends RegistryObject> objectClass)
Retrieves the latest version of the RegistryObject with the given
logical identifier |
MetadataStore |
getMetadataStore()
Get access to the back end store for the registry service. |
RegistryObject |
getNextObject(String lid,
String versionId,
Class<? extends RegistryObject> objectClass)
Retrieves the next version of the RegsitryObject |
RegistryObject |
getObject(String guid,
Class<? extends RegistryObject> objectClass)
Retrieves a registry object of the requested type |
RegistryObject |
getObject(String lid,
String versionId,
Class<? extends RegistryObject> objectClass)
Retrieves a RegistryObject from the registry with the given
identifying information. |
RegistryResponse |
getObjects(ObjectQuery query,
Integer start,
Integer rows,
Class<? extends RegistryObject> objectClass)
Generic query for a given class of registry objects. |
List<RegistryObject> |
getObjectVersions(String lid,
Class<? extends RegistryObject> objectClass)
Retrieves all versions of a RegistryObject |
RegistryObject |
getPreviousObject(String lid,
String versionId,
Class<? extends RegistryObject> objectClass)
Retrieves the previous version of the RegistryObject |
Report |
getReport()
Gives back some basic summary information about the registry. |
Versioner |
getVersioner()
|
String |
publishObject(String user,
RegistryObject registryObject)
Publishes a registry object to the registry. |
String |
publishObject(String user,
RegistryObject registryObject,
String packageId)
Publishes a registry object to the registry. |
void |
setIdentifierGenerator(IdentifierGenerator idGenerator)
Sets the class used to generate unique ids for registry objects |
void |
setMetadataStore(MetadataStore metadataStore)
Set where to store all the metadata for registry objects. |
void |
setVersioner(Versioner versioner)
Sets the class used to generate and sort versions for registry objects. |
void |
updateObject(String user,
RegistryObject registryObject)
This method allows one to update all the metadata associated with a registry object. |
String |
versionObject(String user,
String lid,
RegistryObject object,
boolean major)
Versions a RegistryObject in the registry and publishes the
contents of the provided extrinsic object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegistryServiceImpl()
Method Detail |
---|
public void setMetadataStore(MetadataStore metadataStore)
RegistryService
setMetadataStore
in interface RegistryService
metadataStore
- for registry object metadatapublic MetadataStore getMetadataStore()
RegistryService
getMetadataStore
in interface RegistryService
public void setVersioner(Versioner versioner)
RegistryService
setVersioner
in interface RegistryService
versioner
- to use when generating a new version of a registry object.public Versioner getVersioner()
getVersioner
in interface RegistryService
public void setIdentifierGenerator(IdentifierGenerator idGenerator)
RegistryService
setIdentifierGenerator
in interface RegistryService
idGenerator
- to use to generate a guid for registry objects when there is not
one supplied by clients.public IdentifierGenerator getIdentifierGenerator()
getIdentifierGenerator
in interface RegistryService
public RegistryResponse getExtrinsics(Integer start, Integer rows)
RegistryService
ExtrinsicObject
's in the
registry.
getExtrinsics
in interface RegistryService
start
- the index at which to start the result list fromrows
- how many results to return
public RegistryResponse getExtrinsics(ExtrinsicQuery query)
RegistryService
getExtrinsics
in interface RegistryService
query
- holds a set of filters to match against extrinsics
public RegistryResponse getExtrinsics(ExtrinsicQuery query, Integer start, Integer rows)
RegistryService
getExtrinsics
in interface RegistryService
query
- holds a set of filters to match against ExtrinsicObject
'sstart
- the index at which to start the result list from. This index
starts at one and if anything less than one is provided it will
default to one.rows
- how many results to return
public Report getReport()
RegistryService
getReport
in interface RegistryService
public String versionObject(String user, String lid, RegistryObject object, boolean major) throws RegistryServiceException
RegistryService
RegistryObject
in the registry and publishes the
contents of the provided extrinsic object.
versionObject
in interface RegistryService
user
- that has taken the action. Typically this should point to a unique
username.lid
- logical identifier of the parent extrinsic objectobject
- the contents for this version of the extrinsic objectmajor
- flag to indicate whether this is a minor or major version
RegistryServiceException
public RegistryObject getLatestObject(String lid, Class<? extends RegistryObject> objectClass)
RegistryService
RegistryObject
with the given
logical identifier
getLatestObject
in interface RegistryService
lid
- of extrinsic to look up
public RegistryObject getEarliestObject(String lid, Class<? extends RegistryObject> objectClass)
RegistryService
RegsitryObject
with the given
logical identifier
getEarliestObject
in interface RegistryService
lid
- of registry object to look upobjectClass
- the type of object to look up
public RegistryObject getNextObject(String lid, String versionId, Class<? extends RegistryObject> objectClass)
RegistryService
RegsitryObject
getNextObject
in interface RegistryService
lid
- of the current registry objectversionId
- of the current registry object. This is the user provided version.objectClass
- the type of object to look up
public RegistryObject getPreviousObject(String lid, String versionId, Class<? extends RegistryObject> objectClass)
RegistryService
RegistryObject
getPreviousObject
in interface RegistryService
lid
- of the current registry objectversionId
- of the current registry version. This is the user provided
version.objectClass
- the type of object to look up
public List<RegistryObject> getObjectVersions(String lid, Class<? extends RegistryObject> objectClass)
RegistryService
RegistryObject
getObjectVersions
in interface RegistryService
lid
- of the registry object of interestobjectClass
- the type of object to look up
public RegistryObject getObject(String lid, String versionId, Class<? extends RegistryObject> objectClass)
RegistryService
RegistryObject
from the registry with the given
identifying information.
getObject
in interface RegistryService
lid
- of the registry object of interest.versionId
- of the registry object of interest. This is the user provided
version.objectClass
- the type of object to look up
public List<ClassificationNode> getClassificationNodes(String scheme)
RegistryService
ClassificationNode
for a given
ClassificationScheme
getClassificationNodes
in interface RegistryService
scheme
- guid for which to get the classification nodes for
public void changeObjectStatus(String user, String lid, String versionId, ObjectAction action, Class<? extends RegistryObject> objectClass)
RegistryService
RegistryObject
status with the given identifying
information.
changeObjectStatus
in interface RegistryService
user
- that is requesting the changelid
- logical identifier of the extrinsicversionId
- of the registry object. This is the user supplied versionaction
- which to take (i.e. approve, deprecate, etc.)objectClass
- identifies the type of registry objectpublic void changeObjectStatus(String user, String guid, ObjectAction action, Class<? extends RegistryObject> objectClass)
RegistryService
changeObjectStatus
in interface RegistryService
user
- that is requesting the changeguid
- of the registry object to uniquely identify itaction
- which to take (i.e. approve, deprecate, etc.)objectClass
- identifies the type of registry objectpublic void updateObject(String user, RegistryObject registryObject)
RegistryService
updateObject
in interface RegistryService
user
- that is requesting the updateregistryObject
- to update too. The update is made to the object with the same guidpublic RegistryResponse getAssociations(AssociationQuery query, Integer start, Integer rows)
RegistryService
getAssociations
in interface RegistryService
query
- holds a set of filters to match against Association
'sstart
- the index at which to start the result list from. This index
starts at one and if anything less than one is provided it will
default to one.rows
- how many results to return
public RegistryResponse getObjects(ObjectQuery query, Integer start, Integer rows, Class<? extends RegistryObject> objectClass)
RegistryService
getObjects
in interface RegistryService
query
- based on a set of filtersstart
- index within the results to start at. This index is one basedrows
- number of results to getobjectClass
- the type of registry object to look for
RegistryObject
with the given classpublic RegistryResponse getAuditableEvents(String affectedObject)
RegistryService
getAuditableEvents
in interface RegistryService
affectedObject
- guid for the registry object of interest
public String publishObject(String user, RegistryObject registryObject, String packageId) throws RegistryServiceException
RegistryService
publishObject
in interface RegistryService
user
- that is requesting the object to be publishedregistryObject
- to publishpackageId
- to associate this publish event with
RegistryServiceException
public String publishObject(String user, RegistryObject registryObject) throws RegistryServiceException
RegistryService
publishObject
in interface RegistryService
user
- that is requesting the object to be publishedregistryObject
- to publish
RegistryServiceException
public void deleteObject(String user, String lid, String versionId, Class<? extends RegistryObject> objectClass)
RegistryService
RegistryObject
from the registry which share the logical
identifier and version.
deleteObject
in interface RegistryService
user
- that requested the deletelid
- logical identifier of registry objectversionId
- user defined version for the registry objectobjectClass
- type of registry objectpublic void deleteObject(String user, String guid, Class<? extends RegistryObject> objectClass)
RegistryService
RegistryObject
from the registry which share the logical
identifier and version.
deleteObject
in interface RegistryService
user
- that requested the deleteguid
- globally unique identifier of the registry objectobjectClass
- type of registry objectpublic Association getAssocation(String guid)
RegistryService
Association
from the registry with the given guid
getAssocation
in interface RegistryService
guid
- globally unique identifier of the registry object
public ExtrinsicObject getExtrinsic(String guid)
RegistryService
ExtrinsicObject
from the registry
getExtrinsic
in interface RegistryService
guid
- globally unique identifier of the extrinsic object
public RegistryObject getObject(String guid, Class<? extends RegistryObject> objectClass)
RegistryService
getObject
in interface RegistryService
guid
- globally unique identifier of the objectobjectClass
- type of the registry object
public String configure(String user, RegistryPackage registryPackage, List<? extends RegistryObject> registryObjects) throws RegistryServiceException
RegistryService
configure
in interface RegistryService
user
- that has taken the action. Typically this should point to a unique
username.registryPackage
- to associate objects toregistryObjects
- classification schemes and nodes that are apart of this config
RegistryServiceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |