|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.pds.registry.client.RegistryClient
public class RegistryClient
This class is a Java client to be used to exchange information with a registry service. In the background it simply uses HTTP calls but returns Java objects to ease integration.
Constructor Summary | |
---|---|
RegistryClient(String baseUrl)
|
|
RegistryClient(String baseUrl,
SecurityContext securityContext,
String username,
String password)
|
Method Summary | ||
---|---|---|
void |
changeStatusOfPackageMembers(String packageGuid,
ObjectAction action)
Approve, deprecate, or undeprecate all members of a package |
|
|
deleteObject(String guid,
Class<T> objectClass)
Removes an object from the registry of the given type |
|
void |
deletePackageMembers(String packageGuid)
Deletes all members that are associated with the given package guid. |
|
PagedResponse<Association> |
getAssociations(RegistryQuery<AssociationFilter> query,
Integer start,
Integer rows)
Retrieves a set of association objects that match the query. |
|
PagedResponse<AuditableEvent> |
getAuditableEvents(RegistryQuery<EventFilter> query,
Integer start,
Integer rows)
Retrieves a paged set of registry objects from the collection of objects of the specified type. |
|
PagedResponse<ExtrinsicObject> |
getExtrinsics(RegistryQuery<ExtrinsicFilter> query,
Integer start,
Integer rows)
Retrieves a set of extrinsic objects that match the query. |
|
|
getLatestObject(String lid,
Class<T> objectClass)
Retrieve the latest version of a registry object |
|
|
getObject(String guid,
Class<T> objectClass)
Retrieves an object from the registry of the given type |
|
|
getObjects(Integer start,
Integer rows,
Class<T> objectClass)
Retrieves a paged set of registry objects from the collection of objects of the specified type. |
|
String |
getRegistrationPackageGuid()
|
|
static void |
main(String[] args)
|
|
String |
publishObject(RegistryObject object)
Publish a registry object to the service |
|
void |
setMediaType(String mediaType)
Used to override the type of messages the client will exchange. |
|
void |
setRegistrationPackageId(String registrationPackageGuid)
|
|
void |
updateObject(RegistryObject object)
Updates the given registry object by using its guid to indicate the object to update. |
|
String |
versionObject(RegistryObject object)
Publishes a version of the given object that is considered a major version update. |
|
String |
versionObject(RegistryObject object,
Boolean major)
Publishes a version of the given object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegistryClient(String baseUrl) throws RegistryClientException
RegistryClientException
public RegistryClient(String baseUrl, SecurityContext securityContext, String username, String password) throws RegistryClientException
RegistryClientException
Method Detail |
---|
public void setMediaType(String mediaType)
mediaType
- to use for exchanging messagespublic <T extends RegistryObject> T getObject(String guid, Class<T> objectClass) throws RegistryServiceException
guid
- identifier for the objectobjectClass
- of object interested in retrieving
RegistryServiceException
public <T extends RegistryObject> void deleteObject(String guid, Class<T> objectClass) throws RegistryServiceException
T
- guid
- identifier for the objectobjectClass
- of object interested in deleting
RegistryServiceException
public void deletePackageMembers(String packageGuid) throws RegistryServiceException
packageGuid
- to delete from
RegistryServiceException
public void changeStatusOfPackageMembers(String packageGuid, ObjectAction action) throws RegistryServiceException
packageGuid
- to update members fromaction
- to take which will end up affecting members statuses
RegistryServiceException
public String publishObject(RegistryObject object) throws RegistryServiceException
object
- to publish
RegistryServiceException
public String versionObject(RegistryObject object) throws RegistryServiceException
object
- to publish
RegistryServiceException
public String versionObject(RegistryObject object, Boolean major) throws RegistryServiceException
object
- to publishmajor
- flag to indicate major or minor version
RegistryServiceException
public void updateObject(RegistryObject object) throws RegistryServiceException
object
- to update to
RegistryServiceException
public <T extends RegistryObject> T getLatestObject(String lid, Class<T> objectClass) throws RegistryServiceException
lid
- logical identifier which is associated with a collection of
objectsobjectClass
- of object interested in retrieving
RegistryServiceException
public <T extends RegistryObject> PagedResponse<T> getObjects(Integer start, Integer rows, Class<T> objectClass) throws RegistryServiceException
start
- indicates where in the set of objects to beginrows
- indicates how many objects to returnobjectClass
- the type of object to retrieve
RegistryServiceException
public PagedResponse<ExtrinsicObject> getExtrinsics(RegistryQuery<ExtrinsicFilter> query, Integer start, Integer rows) throws RegistryServiceException
query
- filters for the extrinsicstart
- indicates where in the set of objects to beginrows
- indicates how many objects to return
RegistryServiceException
public PagedResponse<Association> getAssociations(RegistryQuery<AssociationFilter> query, Integer start, Integer rows) throws RegistryServiceException
query
- filters for the associationstart
- indicates where in the set of objects to beginrows
- indicates how many objects to return
RegistryServiceException
public PagedResponse<AuditableEvent> getAuditableEvents(RegistryQuery<EventFilter> query, Integer start, Integer rows) throws RegistryServiceException
start
- indicates where in the set of objects to beginrows
- indicates how many objects to returnobjectClass
- the type of object to retrieve
RegistryServiceException
public String getRegistrationPackageGuid()
public void setRegistrationPackageId(String registrationPackageGuid)
public static void main(String[] args) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |