| Constructor and Description |
|---|
RegistryImpl() |
RegistryImpl(String gateway,
String username,
String password) |
| Modifier and Type | Method and Description |
|---|---|
Object |
add(ChildDataType dataType,
Object newObjectToAdd,
Object dependentIdentifier)
This method is to add an object in to the registry
|
Object |
add(ParentDataType dataType,
Object newObjectToAdd)
This method is to add an object in to the registry
|
Object |
get(RegistryModelType dataType,
Object identifier)
This method is to retrieve object according to the identifier.
|
List<Object> |
get(RegistryModelType dataType,
String fieldName,
Object value)
This method is to retrieve list of objects according to a given criteria
|
List<String> |
getIds(RegistryModelType dataType,
String fieldName,
Object value)
This method is to retrieve all the identifiers according to given filtering criteria.
|
Object |
getValue(RegistryModelType dataType,
Object identifier,
String field)
This method is to retrieve a specific value for a given field.
|
boolean |
isExist(RegistryModelType dataType,
Object identifier)
This method will check whether a given data type which can be identified with the identifier exists or not
|
void |
remove(RegistryModelType dataType,
Object identifier)
This method is to remove a item from the registry
|
List<Object> |
search(RegistryModelType dataType,
Map<String,String> filters) |
void |
update(RegistryModelType dataType,
Object newObjectToUpdate,
Object identifier)
This method is to update the whole object in registry
|
void |
update(RegistryModelType dataType,
Object identifier,
String fieldName,
Object value)
This method is to update a specific field of the data model
|
public RegistryImpl()
throws RegistryException
RegistryExceptionpublic RegistryImpl(String gateway, String username, String password) throws RegistryException
RegistryExceptionpublic Object add(ParentDataType dataType, Object newObjectToAdd) throws RegistryException
add in interface RegistrydataType - Data type is a predefined type which the programmer should choose according to the object he
is going to save in to registrynewObjectToAdd - Object which contains the fields that need to be saved in to registry. This object is a
thrift model object. In experiment case this object can be BasicMetadata, ConfigurationData
etcRegistryExceptionpublic Object add(ChildDataType dataType, Object newObjectToAdd, Object dependentIdentifier) throws RegistryException
add in interface RegistrydataType - Data type is a predefined type which the programmer should choose according to the object he
is going to save in to registrynewObjectToAdd - Object which contains the fields that need to be saved in to registry. This object is a
thrift model object. In experiment case this object can be BasicMetadata, ConfigurationData
etcdependentIdentifier - Object which contains the identifier if the object that is going to add is not a top
level object in the data model. If it is a top level object, programmer can pass it as
nullRegistryExceptionpublic void update(RegistryModelType dataType, Object newObjectToUpdate, Object identifier) throws RegistryException
update in interface RegistrydataType - Data type is a predefined type which the programmer should choose according to the object he
is going to save in to registrynewObjectToUpdate - Object which contains the fields that need to be updated in to registry. This object is a
thrift model object. In experiment case this object can be BasicMetadata, ConfigurationData
etc. CPI programmer can only fill necessary fields that need to be updated. He does not
have to fill the whole object. He needs to only fill the mandatory fields and whatever the
other fields that need to be updated.RegistryExceptionpublic void update(RegistryModelType dataType, Object identifier, String fieldName, Object value) throws RegistryException
update in interface RegistrydataType - Data type is a predefined type which the programmer should choose according to the object he
is going to save in to registryidentifier - Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
identifier will be generated experimentIDfieldName - Field which need to be updated in the registry. In Experiment_Basic_Type, if you want to update the
description, field will be "description". Field names are defined in
org.apache.airavata.registry.cpi.utils.Constantsvalue - Value by which the given field need to be updated. If the field is "description", that field will be
updated by given valueRegistryExceptionpublic Object get(RegistryModelType dataType, Object identifier) throws RegistryException
get in interface RegistrydataType - Data type is a predefined type which the programmer should choose according to the object he
is going to save in to registryidentifier - Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
identifier will be generated experimentIDRegistryExceptionpublic List<Object> get(RegistryModelType dataType, String fieldName, Object value) throws RegistryException
get in interface RegistrydataType - Data type is a predefined type which the programmer should choose according to the object he
is going to save in to registryfieldName - FieldName is the field that filtering should be done. For example, if we want to retrieve all
the experiments for a given user, filterBy will be "userName"value - value for the filtering field. In the experiment case, value for "userName" can be "admin"RegistryExceptionpublic List<Object> search(RegistryModelType dataType, Map<String,String> filters) throws RegistryException
search in interface RegistryRegistryExceptionpublic Object getValue(RegistryModelType dataType, Object identifier, String field) throws RegistryException
getValue in interface RegistrydataType - Data type is a predefined type which the programmer should choose according to the object he
is going to save in to registryidentifier - Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
identifier will be generated experimentIDfield - field that filtering should be done. For example, if we want to execution user for a given
experiment, field will be "userName"RegistryExceptionpublic List<String> getIds(RegistryModelType dataType, String fieldName, Object value) throws RegistryException
getIds in interface RegistrydataType - Data type is a predefined type which the programmer should choose according to the object he
is going to save in to registryfieldName - FieldName is the field that filtering should be done. For example, if we want to retrieve all
the experiments for a given user, filterBy will be "userName"value - value for the filtering field. In the experiment case, value for "userName" can be "admin"RegistryExceptionpublic void remove(RegistryModelType dataType, Object identifier) throws RegistryException
remove in interface RegistrydataType - Data type is a predefined type which the programmer should choose according to the object he
is going to save in to registryidentifier - Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
identifier will be generated experimentIDRegistryExceptionpublic boolean isExist(RegistryModelType dataType, Object identifier) throws RegistryException
isExist in interface RegistrydataType - Data type is a predefined type which the programmer should choose according to the object he
is going to save in to registryidentifier - Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
identifier will be generated experimentIDRegistryExceptionCopyright © 2011–2014 The Apache Software Foundation. All rights reserved.