org.gcube.contentmanagement.contentmanager.smsplugin.util
Class GCubeCollections

java.lang.Object
  extended by org.gcube.contentmanagement.contentmanager.smsplugin.util.GCubeCollections

public class GCubeCollections
extends java.lang.Object

Author:
Federico De Faveri defaveri@isti.cnr.it

Constructor Summary
GCubeCollections()
           
 
Method Summary
static java.util.List<CollectionReference> createGCubeCollection(boolean broadcast, java.lang.String collectionName, java.lang.String collectionDescription, boolean userCollection, boolean read, boolean write, GCUBEScope scope, GCUBESecurityManager... securityManager)
          Create a new gcube collection on SMS and wrap it on CM.
static java.util.List<java.util.concurrent.Future<RPDocument>> deleteGCubeCollection(java.lang.String collectionId, boolean deleteProfile, GCUBEScope scope, GCUBESecurityManager... securityManager)
          Delete a GCube collection from the SMS, CM and optionally from the IS.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GCubeCollections

public GCubeCollections()
Method Detail

createGCubeCollection

public static java.util.List<CollectionReference> createGCubeCollection(boolean broadcast,
                                                                        java.lang.String collectionName,
                                                                        java.lang.String collectionDescription,
                                                                        boolean userCollection,
                                                                        boolean read,
                                                                        boolean write,
                                                                        GCUBEScope scope,
                                                                        GCUBESecurityManager... securityManager)
                                                                 throws java.lang.Exception
Create a new gcube collection on SMS and wrap it on CM.

Parameters:
broadcast - true to broadcast the request to all the CM.
collectionName - the collection name.
collectionDescription - the collection description.
userCollection - the user collection flag.
read - to make the collection readable.
write - to make the collection writable.
scope - the working scope.
securityManager - the security manager.
Returns:
the collection references.
Throws:
java.lang.Exception - if an error occurs during the creation.

deleteGCubeCollection

public static java.util.List<java.util.concurrent.Future<RPDocument>> deleteGCubeCollection(java.lang.String collectionId,
                                                                                            boolean deleteProfile,
                                                                                            GCUBEScope scope,
                                                                                            GCUBESecurityManager... securityManager)
                                                                                     throws java.lang.Exception
Delete a GCube collection from the SMS, CM and optionally from the IS.

Parameters:
collectionId - the collection id
deleteProfile - true to delete the profile from the IS.
scope - the working scope.
securityManager - the security manager to use.
Returns:
a list of Future on collection manager RP.
Throws:
java.lang.Exception - if an error occurs during the deletion.