org.gcube.informationsystem.publisher
Class AdvancedScopedPublisher
java.lang.Object
org.gcube.informationsystem.publisher.AdvancedPublisherCommonUtils
org.gcube.informationsystem.publisher.AdvancedScopedPublisher
- All Implemented Interfaces:
- ScopedPublisher
public class AdvancedScopedPublisher
- extends AdvancedPublisherCommonUtils
- implements ScopedPublisher
Wrapper class of ScopedPublisherImpl class that implements the ScopedPublisher interface
- Author:
- rcirillo
|
Method Summary |
<T extends org.gcube.common.resources.gcore.Resource>
T |
|
create(T resource,
List<String> scopes)
The resource is created in all the scopes in the list and the resource is updated in all the other scopes that are presents in the resource |
<T extends org.gcube.common.resources.gcore.Resource>
T |
|
remove(T resource,
List<String> scopes)
Remove a resource from all the scopes in the input list, if and only if all the scopes are defined in the resource |
<T extends org.gcube.common.resources.gcore.Resource>
T |
|
update(T resource)
The resource will be updated on all scopes that are defined in the resource. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdvancedScopedPublisher
public AdvancedScopedPublisher()
AdvancedScopedPublisher
public AdvancedScopedPublisher(ScopedPublisher publisher)
create
public <T extends org.gcube.common.resources.gcore.Resource> T create(T resource,
List<String> scopes)
throws RegistryNotFoundException
- Description copied from interface:
ScopedPublisher
- The resource is created in all the scopes in the list and the resource is updated in all the other scopes that are presents in the resource
- Specified by:
create in interface ScopedPublisher
- Throws:
RegistryNotFoundException
update
public <T extends org.gcube.common.resources.gcore.Resource> T update(T resource)
throws RegistryNotFoundException
- Description copied from interface:
ScopedPublisher
- The resource will be updated on all scopes that are defined in the resource.
If an updating operation fail. It will be repeated with best-effort delivery approach.
- Specified by:
update in interface ScopedPublisher
- Throws:
RegistryNotFoundException
remove
public <T extends org.gcube.common.resources.gcore.Resource> T remove(T resource,
List<String> scopes)
throws RegistryNotFoundException
- Description copied from interface:
ScopedPublisher
- Remove a resource from all the scopes in the input list, if and only if all the scopes are defined in the resource
- Specified by:
remove in interface ScopedPublisher
- Returns:
- the resource without the current scope if the remove operation is succesfully
- Throws:
RegistryNotFoundException
Copyright © 2013. All Rights Reserved.