org.gcube.informationsystem.publisher
Class ScopedPublisherImpl

java.lang.Object
  extended by org.gcube.informationsystem.publisher.ScopedPublisherImpl
All Implemented Interfaces:
ScopedPublisher

public class ScopedPublisherImpl
extends Object
implements ScopedPublisher


Constructor Summary
protected ScopedPublisherImpl()
           
protected ScopedPublisherImpl(RegistryPublisher rp)
           
 
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
 

Constructor Detail

ScopedPublisherImpl

protected ScopedPublisherImpl()

ScopedPublisherImpl

protected ScopedPublisherImpl(RegistryPublisher rp)
Method Detail

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.