|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DataPolicyMapper
The mapper based on data policy.
| Method Summary | |
|---|---|
java.lang.String |
add(java.lang.String objType,
java.util.Map<java.lang.String,java.lang.String> data)
Add the record of specified type in the local data source. |
void |
delete(java.lang.String objType,
java.lang.String identifier)
Delete the record in specified type with the specified identifier from the local data source. |
java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
get(java.lang.String objType,
java.util.Map<java.lang.String,java.lang.String> data)
Find the records of the specified type and with the specified value. |
java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
getByIdentifiers(java.lang.String objType,
java.util.Map<java.lang.String,java.lang.String> identifiers)
Find the record in the local data source with the specified type and identified by the specific identifiers. |
java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
getFillin(java.lang.String objType,
java.util.Map<java.lang.String,java.lang.String> data)
Get the possible fill-in from the local data source for the input proposed change. |
java.util.List<org.filteredpush.data.definition.BasicFieldDefinition> |
getObjectDef(java.lang.String objType)
Get the list of field definition for the specified record. |
void |
update(java.lang.String objType,
java.util.Map<java.lang.String,java.lang.String> data)
Update the record in specified type with the specified type and value in the local data source. |
| Methods inherited from interface org.filteredpush.mapper.Mapper |
|---|
setAdapterWithClass, setAdapterWithName, setContext |
| Method Detail |
|---|
java.util.List<java.util.Map<java.lang.String,java.lang.String>> getByIdentifiers(java.lang.String objType,
java.util.Map<java.lang.String,java.lang.String> identifiers)
throws UnAuthenticated,
InvalidParameter,
InternalException,
OAuthRedirectException,
ConverterException,
LocalDataSourceAccessException
objType - The type of the target record.identifiers - The list of identifiers identifying the target record.
UnAuthenticated - If the adapter can't be authenticated to access the local
data source.
InvalidParameter - If the input value is not valid.
InternalException - Indicates internal error happening in the local data source
to answer this query.
OAuthRedirectException - If redirection to the OAuth authentication page is needed.
LocalDataSourceAccessException - If the local data source can't be accessed for some reason.
ConverterException - If the data conversion fails.
java.util.List<java.util.Map<java.lang.String,java.lang.String>> get(java.lang.String objType,
java.util.Map<java.lang.String,java.lang.String> data)
throws UnAuthenticated,
InvalidParameter,
InternalException,
OAuthRedirectException,
ConverterException,
LocalDataSourceAccessException
objType - The type of the target record.data - The value to be matched.
UnAuthenticated - If the adapter can't be authenticated to access the local
data source.
InvalidParameter - If the input value is not valid.
InternalException - Indicates internal error happening in the local data source
to answer this query.
OAuthRedirectException - If redirection to the OAuth authentication page is needed.
LocalDataSourceAccessException - If the local data source can't be accessed for some reason.
ConverterException - If the data conversion fails.
java.util.List<java.util.Map<java.lang.String,java.lang.String>> getFillin(java.lang.String objType,
java.util.Map<java.lang.String,java.lang.String> data)
throws UnAuthenticated,
InvalidParameter,
InternalException,
OAuthRedirectException,
ConverterException,
LocalDataSourceAccessException
objType - The type of the target record.data - The proposed change.
UnAuthenticated - If the adapter can't be authenticated to access the local
data source.
InvalidParameter - If the input value is not valid.
InternalException - Indicates internal error happening in the local data source
to answer this query.
OAuthRedirectException - If redirection to the OAuth authentication page is needed.
LocalDataSourceAccessException - If the local data source can't be accessed for some reason.
ConverterException - If the data conversion fails.
java.lang.String add(java.lang.String objType,
java.util.Map<java.lang.String,java.lang.String> data)
throws UnAuthenticated,
InvalidParameter,
MissingInformationException,
UniqueIdentificationException,
InternalException,
OAuthRedirectException,
ConverterException,
LocalDataSourceAccessException,
ObjectExistException
objType - The type of the target record.data - The value of the target record to be created.
UnAuthenticated - If the adapter can't be authenticated to access the local
data source.
InvalidParameter - If the input value is not valid.
InternalException - Indicates internal error happening in the local data source
to answer this query.
OAuthRedirectException - If redirection to the OAuth authentication page is needed.
LocalDataSourceAccessException - If the local data source can't be accessed for some reason.
ConverterException - If the data conversion fails.
MissingInformationException - If the information provided to create the record is not
enough. E.g. the information to create higher taxon is needed
when a taxon is inserted and its higher taxon doesn't exist.
UniqueIdentificationException - If more than one records (could be the referenced record) are
matched according to the input value while only one is
expected. E.g. when insert an identification record, a
gci_botanist (representing the identifier) record will be
found and its id will be used to create the identification
record. But if only the identifier's name is provided and
more than one gci_botanist records are matched, then the
system won't be able to know which record should be used. In
this case, this exception will be thrown out.
ObjectExistException - If the record of the specified type with the specified value
already exists in the local data source.
void update(java.lang.String objType,
java.util.Map<java.lang.String,java.lang.String> data)
throws UnAuthenticated,
InvalidParameter,
MissingInformationException,
UniqueIdentificationException,
InternalException,
OAuthRedirectException,
ConverterException,
LocalDataSourceAccessException,
ObjectExistException
objType - The type of the target record.data - The value of the target record to be updated.
UnAuthenticated - If the adapter can't be authenticated to access the local
data source.
InvalidParameter - If the input value is not valid.
InternalException - Indicates internal error happening in the local data source
to answer this query.
OAuthRedirectException - If redirection to the OAuth authentication page is needed.
LocalDataSourceAccessException - If the local data source can't be accessed for some reason.
ConverterException - If the data conversion fails.
MissingInformationException - If the information provided to create the record is not
enough. E.g. the information to create higher taxon is needed
when a taxon is inserted and its higher taxon doesn't exist.
UniqueIdentificationException - If more than one records (could be the referenced record) are
matched according to the input value while only one is
expected. E.g. when insert an identification record, a
gci_botanist (representing the identifier) record will be
found and its id will be used to create the identification
record. But if only the identifier's name is provided and
more than one gci_botanist records are matched, then the
system won't be able to know which record should be used. In
this case, this exception will be thrown out.
ObjectExistException - If the record of the specified type with the specified value
already exists in the
void delete(java.lang.String objType,
java.lang.String identifier)
throws UnAuthenticated,
InvalidParameter,
InternalException,
OAuthRedirectException,
ConverterException,
LocalDataSourceAccessException
objType - The type of the target record.identifier - The primary key of the target record.
UnAuthenticated - If the adapter can't be authenticated to access the local
data source.
InvalidParameter - If the input value is not valid.
InternalException - Indicates internal error happening in the local data source
to answer this query.
OAuthRedirectException - If redirection to the OAuth authentication page is needed.
LocalDataSourceAccessException - If the local data source can't be accessed for some reason.
ConverterException - If the data conversion fails.java.util.List<org.filteredpush.data.definition.BasicFieldDefinition> getObjectDef(java.lang.String objType)
When the object has cross reference to another object, the mapper will go to the referenced object definition and grab the field definition. This process could be recursive.
The major usage of this method is to generate the table in the webUI to present the existing local dataset and the "new" data. It would also be useful in other cases to help interpret and validate the data.
objType - The type of the target record.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||