public class FederationAdminServiceImpl extends Object implements FederationAdminService
Constructor and Description |
---|
FederationAdminServiceImpl() |
Modifier and Type | Method and Description |
---|---|
List<String> |
addRegistryEntries(List<Metacard> metacards,
Set<String> destinations)
Add the given metacards to the registry catalog with the provided destinations
|
String |
addRegistryEntry(Metacard metacard)
Add the given metacard to the registry catalog
|
String |
addRegistryEntry(Metacard metacard,
Set<String> destinations)
Add the given metacard to the registry catalog with the provided destinations
|
String |
addRegistryEntry(String xml)
Add a registry metacard entry for the xml string provided.
|
String |
addRegistryEntry(String xml,
Set<String> destinations)
Add a registry metacard entry for the xml string provided.
|
void |
deleteRegistryEntriesByMetacardIds(List<String> metacardIds)
* Deletes the registry entry from the registry catalog for each of the provided metacard ids.
|
void |
deleteRegistryEntriesByMetacardIds(List<String> metacardIds,
Set<String> destinations)
* Deletes the registry entry from the registry catalog for each of the provided metacard ids.
|
void |
deleteRegistryEntriesByRegistryIds(List<String> registryIds)
* Deletes the registry entry from the registry catalog for each of the provided registry ids.
|
void |
deleteRegistryEntriesByRegistryIds(List<String> registryIds,
Set<String> destinations)
Deletes the registry entry from the registry catalog for each of the provided registry ids.
|
List<Metacard> |
getInternalRegistryMetacards()
Get a list of internal registry metacards.
|
List<Metacard> |
getInternalRegistryMetacardsByRegistryId(String registryId)
Gets a list of internal registry metacards with the matching registry-id
|
Optional<Metacard> |
getLocalRegistryIdentityMetacard()
Returns the identity metacard for the local registry node.
|
List<Metacard> |
getLocalRegistryMetacards()
Get a list of local registry metacards
|
List<Metacard> |
getLocalRegistryMetacardsByRegistryIds(List<String> ids)
Get a list of local registry metacards with the provided registry ids.
|
List<RegistryPackageType> |
getLocalRegistryObjects()
Get a list of local registry objects
|
List<Metacard> |
getRegistryMetacards()
Get a list of registry metacards
|
List<Metacard> |
getRegistryMetacards(Set<String> destinations)
Get a list of registry metacards
|
List<Metacard> |
getRegistryMetacardsByRegistryIds(List<String> ids)
Get a list of registry metacards with the provided registry ids.
|
List<Metacard> |
getRegistryMetacardsByRegistryIds(List<String> ids,
boolean includeInternal)
Get a list of registry metacards with the provided registry ids.
|
RegistryPackageType |
getRegistryObjectByRegistryId(String registryId)
Get a registry object by registry id
|
RegistryPackageType |
getRegistryObjectByRegistryId(String registryId,
Set<String> sourceIds)
Get a registry object by registry id providing a list of source ids to be queried
|
List<RegistryPackageType> |
getRegistryObjects()
Get a list of all registry objects
|
void |
setCatalogFramework(CatalogFramework catalogFramework) |
void |
setFilterBuilder(FilterBuilder filterBuilder) |
void |
setMetacardMarshaller(MetacardMarshaller helper) |
void |
setRegistryTransformer(InputTransformer inputTransformer) |
void |
updateRegistryEntry(Metacard updateMetacard)
* Write the provided metacard to the registry catalog.
|
void |
updateRegistryEntry(Metacard updateMetacard,
Set<String> destinations)
Write the provided metacard to the registry catalog.
|
void |
updateRegistryEntry(String xml)
Update a registry metacard for the xml string provided.
|
void |
updateRegistryEntry(String xml,
Set<String> destinations)
Update a registry metacard for the xml string provided.
|
public String addRegistryEntry(String xml) throws FederationAdminException
FederationAdminService
addRegistryEntry
in interface FederationAdminService
xml
- String representation of a registry package xmlFederationAdminException
- If the xml string is blank. If an exception is thrown from the
registryTransformer. The CatalogFramework throws an exception trying to the metacard.public String addRegistryEntry(String xml, Set<String> destinations) throws FederationAdminException
FederationAdminService
addRegistryEntry
in interface FederationAdminService
xml
- String representation of a registry package xmldestinations
- Set of destinations to addFederationAdminException
- If the xml string is blank. If an exception is thrown from the
registryTransformer. The CatalogFramework throws an exception trying to add the metacard.public String addRegistryEntry(Metacard metacard) throws FederationAdminException
FederationAdminService
addRegistryEntry
in interface FederationAdminService
metacard
- Metacard to be storedFederationAdminException
- If the metacard provided was null. The CatalogFramework.create
call throws IngestException or SourceUnavailableExceptionpublic List<String> addRegistryEntries(List<Metacard> metacards, Set<String> destinations) throws FederationAdminException
FederationAdminService
addRegistryEntries
in interface FederationAdminService
metacards
- Metacards to be storeddestinations
- Set of destinations to addFederationAdminException
- If the metacard provided was null. The CatalogFramework.create
call throws IngestException or SourceUnavailableExceptionpublic String addRegistryEntry(Metacard metacard, Set<String> destinations) throws FederationAdminException
FederationAdminService
addRegistryEntry
in interface FederationAdminService
metacard
- Metacard to be storeddestinations
- Set of destinations to addFederationAdminException
- If the metacard provided was null. The CatalogFramework.create
call throws IngestException or SourceUnavailableExceptionpublic void updateRegistryEntry(String xml) throws FederationAdminException
FederationAdminService
updateRegistryEntry
in interface FederationAdminService
xml
- String representation of a registry package xmlFederationAdminException
- If the provided metacard doesn't have an id. If an exception
is thrown from the RegistryTransformer If CatalogFramework.update call throws
IngestException or SourceUnavailableExceptionpublic void updateRegistryEntry(String xml, Set<String> destinations) throws FederationAdminException
FederationAdminService
updateRegistryEntry
in interface FederationAdminService
xml
- String representation of a registry package xmldestinations
- Set of destinations to addFederationAdminException
- If the provided metacard doesn't have an id. If an exception
is thrown from the RegistryTransformer If CatalogFramework.update call throws
IngestException or SourceUnavailableExceptionpublic void updateRegistryEntry(Metacard updateMetacard) throws FederationAdminException
FederationAdminService
updateRegistryEntry
in interface FederationAdminService
updateMetacard
- Metacard with updates to be stored in the registry catalogFederationAdminException
- If the provided metacard doesn't have an id. If
CatalogFramework.update call throws IngestException or SourceUnavailableExceptionpublic void updateRegistryEntry(Metacard updateMetacard, Set<String> destinations) throws FederationAdminException
FederationAdminService
updateRegistryEntry
in interface FederationAdminService
updateMetacard
- Metacard with updates to be stored in the registry catalogdestinations
- Set of destinations to addFederationAdminException
- If the provided metacard doesn't have an id. If
CatalogFramework.update call throws IngestException or SourceUnavailableExceptionpublic void deleteRegistryEntriesByRegistryIds(List<String> registryIds) throws FederationAdminException
FederationAdminService
deleteRegistryEntriesByRegistryIds
in interface FederationAdminService
registryIds
- The list of registry ids to be deleted.FederationAdminException
- If the list of ids provided is empty. If IngestException or
Source UnavailableException was thrown by CatalogFramework.deletepublic void deleteRegistryEntriesByRegistryIds(List<String> registryIds, Set<String> destinations) throws FederationAdminException
FederationAdminService
deleteRegistryEntriesByRegistryIds
in interface FederationAdminService
registryIds
- The list of registry ids to be deleted.destinations
- Set of destinations to addFederationAdminException
- If the list of ids provided is empty. If IngestException or
Source UnavailableException was thrown by CatalogFramework.deletepublic void deleteRegistryEntriesByMetacardIds(List<String> metacardIds) throws FederationAdminException
FederationAdminService
deleteRegistryEntriesByMetacardIds
in interface FederationAdminService
metacardIds
- The list of metacard ids to be deleted.FederationAdminException
- If the list of ids provided is empty. If IngestException or
Source UnavailableException was thrown by CatalogFramework.deletepublic void deleteRegistryEntriesByMetacardIds(List<String> metacardIds, Set<String> destinations) throws FederationAdminException
FederationAdminService
deleteRegistryEntriesByMetacardIds
in interface FederationAdminService
metacardIds
- The list of metacard ids to be deleted.destinations
- The set of destinations to be addedFederationAdminException
- If the list of ids provided is empty. If IngestException or
Source UnavailableException was thrown by CatalogFramework.deletepublic List<Metacard> getRegistryMetacards() throws FederationAdminException
FederationAdminService
getRegistryMetacards
in interface FederationAdminService
FederationAdminException
- If any exception was thrownpublic List<Metacard> getInternalRegistryMetacards() throws FederationAdminException
FederationAdminService
getInternalRegistryMetacards
in interface FederationAdminService
FederationAdminException
- If any exception was thrownpublic List<Metacard> getInternalRegistryMetacardsByRegistryId(String registryId) throws FederationAdminException
FederationAdminService
getInternalRegistryMetacardsByRegistryId
in interface FederationAdminService
registryId
- registry-id to matchFederationAdminException
public List<Metacard> getRegistryMetacards(Set<String> destinations) throws FederationAdminException
FederationAdminService
getRegistryMetacards
in interface FederationAdminService
destinations
- Set of destinations to query fromFederationAdminException
- If any exception was thrown by the call to
CatalogFramework.query()public List<Metacard> getLocalRegistryMetacards() throws FederationAdminException
FederationAdminService
getLocalRegistryMetacards
in interface FederationAdminService
FederationAdminException
- If any exception was thrown by the call to
CatalogFramework.query()public List<Metacard> getLocalRegistryMetacardsByRegistryIds(List<String> ids) throws FederationAdminException
FederationAdminService
getLocalRegistryMetacardsByRegistryIds
in interface FederationAdminService
ids
- List of IDs to to get metacards forFederationAdminException
- If empty list of registry ids is provided If the list of id
filters isn't created If any exception was thrown by the call to CatalogFramework.query()public List<Metacard> getRegistryMetacardsByRegistryIds(List<String> ids) throws FederationAdminException
FederationAdminService
getRegistryMetacardsByRegistryIds
in interface FederationAdminService
ids
- List of IDs to to get metacards forFederationAdminException
- If empty list of registry ids is provided If the list of id
filters isn't created If any exception was thrown by the call to CatalogFramework.query()public List<Metacard> getRegistryMetacardsByRegistryIds(List<String> ids, boolean includeInternal) throws FederationAdminException
FederationAdminService
getRegistryMetacardsByRegistryIds
in interface FederationAdminService
ids
- List of IDs to to get metacards forincludeInternal
- boolean indicating whether the internal representation metacards should
be includedFederationAdminException
- If empty list of registry ids is provided If the list of id
filters isn't created If any exception was thrown by the call to CatalogFramework.query()public List<RegistryPackageType> getLocalRegistryObjects() throws FederationAdminException
FederationAdminService
getLocalRegistryObjects
in interface FederationAdminService
FederationAdminException
- If an exception is thrown trying to unmarshal the xmlpublic List<RegistryPackageType> getRegistryObjects() throws FederationAdminException
FederationAdminService
getRegistryObjects
in interface FederationAdminService
FederationAdminException
- If an exception is thrown trying to unmarshal the xmlpublic RegistryPackageType getRegistryObjectByRegistryId(String registryId) throws FederationAdminException
FederationAdminService
getRegistryObjectByRegistryId
in interface FederationAdminService
FederationAdminException
- If an exception is thrown trying to unmarshal the xmlpublic RegistryPackageType getRegistryObjectByRegistryId(String registryId, Set<String> sourceIds) throws FederationAdminException
FederationAdminService
getRegistryObjectByRegistryId
in interface FederationAdminService
FederationAdminException
- If an exception is thrown trying to unmarshal the xmlpublic Optional<Metacard> getLocalRegistryIdentityMetacard() throws FederationAdminException
FederationAdminService
getLocalRegistryIdentityMetacard
in interface FederationAdminService
Optional
containing the Identity Metacard
FederationAdminException
- if more than one metacard was foundpublic void setCatalogFramework(CatalogFramework catalogFramework)
public void setFilterBuilder(FilterBuilder filterBuilder)
public void setMetacardMarshaller(MetacardMarshaller helper)
public void setRegistryTransformer(InputTransformer inputTransformer)
This work is licensed under a Creative Commons Attribution 4.0 International License.