|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.pds.registry.service.RegistryService
@Service(value="registryService") public class RegistryService
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 | |
---|---|
RegistryService()
|
Method Summary | |
---|---|
void |
changeRegistryObjectStatus(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 |
changeStatus(String user,
String lid,
String versionId,
ObjectAction action)
Changes the Product status with the given identifying information. |
void |
deleteRegistryObject(String user,
String guid,
Class<? extends RegistryObject> objectClass)
Deletes a RegistryObject from the registry which share the logical
identifier and version. |
void |
deleteRegistryObject(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 |
getAssociations(String lid,
String versionId,
Integer start,
Integer rows)
Retrieves all associations for a given registry object. |
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 |
Product |
getEarliestProduct(String lid)
Retrieves the earliest version of the Product with the given
logical identifier |
IdentifierGenerator |
getIdentifierGenerator()
|
Product |
getLatestProduct(String lid)
Retrieves the latest version of the Product with the given logical
identifier |
MetadataStore |
getMetadataStore()
Get access to the back end store for the registry service. |
Product |
getNextProduct(String lid,
String versionId)
Retrieves the next version of the Product |
Product |
getPreviousProduct(String lid,
String versionId)
Retrieves the previous version of the Product |
Product |
getProduct(String guid)
Retrieves a Product from the registry |
Product |
getProduct(String lid,
String versionId)
Retrieves a Product from the registry with the given identifying
information. |
RegistryResponse |
getProducts(Integer start,
Integer rows)
This method allows one to page through the Product 's in the
registry. |
RegistryResponse |
getProducts(ProductQuery query)
Retrieves the first set of products that match the query |
RegistryResponse |
getProducts(ProductQuery query,
Integer start,
Integer rows)
Retrieves a set of products that match the given query. |
List<Product> |
getProductVersions(String lid)
Retrieves all versions of a Product |
RegistryObject |
getRegistryObject(String guid,
Class<? extends RegistryObject> objectClass)
Retrieves a registry object of the requested type |
StatusInfo |
getStatus()
Gives back some basic summary information about the registry. |
Versioner |
getVersioner()
|
String |
publishRegistryObject(String user,
RegistryObject registryObject)
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 |
updateRegistryObject(String user,
RegistryObject registryObject)
This method allows one to update all the metadata associated with a registry object. |
String |
versionProduct(String user,
String lid,
Product product,
boolean major)
Versions a Product in the registry and publishes the contents of
the provided product. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegistryService()
Method Detail |
---|
public void setMetadataStore(MetadataStore metadataStore)
metadataStore
- for registry object metadatapublic MetadataStore getMetadataStore()
public void setVersioner(Versioner versioner)
versioner
- to use when generating a new version of a registry object.public Versioner getVersioner()
public void setIdentifierGenerator(IdentifierGenerator idGenerator)
idGenerator
- to use to generate a guid for registry objects when there is not
one supplied by clients.public IdentifierGenerator getIdentifierGenerator()
public RegistryResponse getProducts(Integer start, Integer rows)
Product
's in the
registry.
start
- the index at which to start the result list fromrows
- how many results to return
public RegistryResponse getProducts(ProductQuery query)
query
- holds a set of filters to match against products
public RegistryResponse getProducts(ProductQuery query, Integer start, Integer rows)
query
- holds a set of filters to match against Product
'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 StatusInfo getStatus()
public String versionProduct(String user, String lid, Product product, boolean major) throws RegistryServiceException
Product
in the registry and publishes the contents of
the provided product.
user
- that has taken the action. Typically this should point to a unique
username.lid
- logical identifier of the parent registry objectproduct
- the contents for this version of the productmajor
- flag to indicate whether this is a minor or major version
RegistryServiceException
public Product getLatestProduct(String lid)
Product
with the given logical
identifier
lid
- of product to look up
public Product getEarliestProduct(String lid)
Product
with the given
logical identifier
lid
- of product to look up
public Product getNextProduct(String lid, String versionId)
Product
lid
- of the current productversionId
- of the current product. This is the user provided version.
public Product getPreviousProduct(String lid, String versionId)
Product
lid
- of the current productversionId
- of the current product. This is the user provided version.
public List<Product> getProductVersions(String lid)
Product
lid
- of the product of interest
public Product getProduct(String lid, String versionId)
Product
from the registry with the given identifying
information.
lid
- of the product of interest.versionId
- of the product of interest. This is the user provided version.
public List<ClassificationNode> getClassificationNodes(String scheme)
ClassificationNode
for a given
ClassificationScheme
scheme
- guid for which to get the classification nodes for
public void changeStatus(String user, String lid, String versionId, ObjectAction action)
Product
status with the given identifying information.
user
- that is requesting the changelid
- logical identifier of the productversionId
- of the product. This is the user supplied versionaction
- which to take (i.e. approve, deprecate, etc.)public void changeRegistryObjectStatus(String user, String guid, ObjectAction action, Class<? extends RegistryObject> objectClass)
user
- that is requesting the changeguid
- of the product to uniquely identify itaction
- which to take (i.e. approve, deprecate, etc.)objectClass
- identifies the type of registry objectpublic void updateRegistryObject(String user, RegistryObject registryObject)
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)
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 getAuditableEvents(String affectedObject)
affectedObject
- guid for the registry object of interest
public RegistryResponse getAssociations(String lid, String versionId, Integer start, Integer rows)
lid
- of the object of interestversionId
- of the object of interest. This is the user provided version.start
- 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 String publishRegistryObject(String user, RegistryObject registryObject) throws RegistryServiceException
user
- that is requesting the object to be publishedregistryObject
- to publish
RegistryServiceException
public void deleteRegistryObject(String user, String lid, String versionId, Class<? extends RegistryObject> objectClass)
RegistryObject
from the registry which share the logical
identifier and version.
user
- that requested the deletelid
- logical identifier of registry objectversionId
- user defined version for the registry objectobjectClass
- type of registry objectpublic void deleteRegistryObject(String user, String guid, Class<? extends RegistryObject> objectClass)
RegistryObject
from the registry which share the logical
identifier and version.
user
- that requested the deleteguid
- globally unique identifier of the registry objectobjectClass
- type of registry objectpublic Association getAssocation(String guid)
Association
from the registry with the given guid
guid
- globally unique identifier of the registry object
public Product getProduct(String guid)
Product
from the registry
guid
- globally unique identifier of the registry object
public RegistryObject getRegistryObject(String guid, Class<? extends RegistryObject> objectClass)
guid
- globally unique identifier of the objectobjectClass
- type of the registry object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |