Collections
Date: 2013-06-18

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gcube.contentmanagement.gcubedocumentlibrary.util
Class Collections

    java.lang.Object
      org.gcube.contentmanagement.gcubedocumentlibrary.util.Collections

    public class Collections

extends java.lang.Object

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

Field Summary
`static java.lang.String` | `COMMON_NS`
`static java.lang.String` | `PROVIDER_NS`

Constructor Summary
`Collections()`

Method Summary
`static java.util.List<Collection>` | `find(Collection... collection)` Finds the CM collection in the current scope.
`static java.util.List<Collection>` | `find(GCUBEScope scope, Collection... collection)` Finds the CM collection in the specified scope.
`static java.util.List<Collection>` | `findById(GCUBEScope scope, java.lang.String id)` Finds the collection by id in a given scope.
`static java.util.List<Collection>` | `findById(java.lang.String id)` Finds the collection by id in the current scope.
`static java.util.List<Collection>` | `findByName(GCUBEScope scope, java.lang.String name)` Finds the collection by name in a given scope.
`static java.util.List<Collection>` | `findByName(java.lang.String name)` Finds the collection by name in the current scope.
`static int` | `getCardinality(GCUBEScope scope, java.lang.String collectionId)` Returns the collection cardinality.
`static int` | `getCardinality(java.lang.String collectionId)` Returns the collection cardinality in the current scope.
`static java.util.List<Collection>` | `list()` List all available collections in the current scope.
`static java.util.List<Collection>` | `list(GCUBEScope scope)` List all available collections on the specified scope.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PROVIDER_NS

    public static final java.lang.String PROVIDER_NS

See Also:
  Constant Field Values

### COMMON_NS

    public static final java.lang.String COMMON_NS

See Also:
  Constant Field Values

Constructor Detail

### Collections

    public Collections()

Method Detail

### findById

    public static java.util.List<Collection> findById(java.lang.String id)
                                               throws java.lang.Exception

  Finds the collection by id in the current scope.

  Parameters:
    `id` - the collection id.
  Returns:
    the found collection list.
  Throws:
    `java.lang.Exception` - if an error occurs during the search.

### findById

    public static java.util.List<Collection> findById(GCUBEScope scope,
                                                      java.lang.String id)
                                               throws java.lang.Exception

  Finds the collection by id in a given scope.

  Parameters:
    `id` - the collection id.
  Returns:
    the found collection list.
  Throws:
    `java.lang.Exception` - if an error occurs during the search.

### findByName

    public static java.util.List<Collection> findByName(java.lang.String name)
                                                 throws java.lang.Exception

  Finds the collection by name in the current scope.

  Parameters:
    `name` - the collection name.
  Returns:
    the found collection list.
  Throws:
    `java.lang.Exception` - if an error occurs during the search.

### findByName

    public static java.util.List<Collection> findByName(GCUBEScope scope,
                                                        java.lang.String name)
                                                 throws java.lang.Exception

  Finds the collection by name in a given scope.

  Parameters:
    `scope` - the scope.
    `name` - the collection name.
  Returns:
    the found collection list.
  Throws:
    `java.lang.Exception` - if an error occurs during the search.

### list

    public static java.util.List<Collection> list()
                                           throws java.lang.Exception

  List all available collections in the current scope.

  Returns:
    the available collections.
  Throws:
    `java.lang.Exception` - if an error occurs during the search.

### list

    public static java.util.List<Collection> list(GCUBEScope scope)
                                           throws java.lang.Exception

  List all available collections on the specified scope.

  Parameters:
    `scope` - the working scope.
  Returns:
    the available collections.
  Throws:
    `java.lang.Exception` - if an error occurs during the search.

### find

    public static java.util.List<Collection> find(Collection... collection)
                                           throws java.lang.Exception

  Finds the CM collection in the current scope.

  Parameters:
    `scope` - the working scope.
    `collection` - the optional collection stubs.
  Returns:
    the found collections.
  Throws:
    `java.lang.Exception` - if an error occurs during the collection finding.

### find

    public static java.util.List<Collection> find(GCUBEScope scope,
                                                  Collection... collection)
                                           throws java.lang.Exception

  Finds the CM collection in the specified scope.

  Parameters:
    `scope` - the working scope.
    `collection` - the optional collection stubs.
  Returns:
    the found collections.
  Throws:
    `java.lang.Exception` - if an error occurs during the collection finding.

### getCardinality

    public static int getCardinality(java.lang.String collectionId)
                              throws java.lang.Exception

  Returns the collection cardinality in the current scope.

  Parameters:
    `collectionId` - the collection id.
  Returns:
    the collection cardinality.
  Throws:
    `java.lang.Exception` - if an error occurs retrieving the collection profile.

### getCardinality

    public static int getCardinality(GCUBEScope scope,
                                     java.lang.String collectionId)
                              throws java.lang.Exception

  Returns the collection cardinality.

  Parameters:
    `scope` - the collection scope.
    `collectionId` - the collection id.
  Returns:
    the collection cardinality.
  Throws:
    `java.lang.Exception` - if an error occurs retrieving the collection profile.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD