org.glite.data.catalog.service.meta
Interface MetadataCatalog

All Superinterfaces:
FASBase, MetadataBase, MetadataSchema, ServiceBase

public interface MetadataCatalog
extends MetadataBase, MetadataSchema

The middleware level API for handling individual entries in the Metadata Catalog component. This is the interface that the service exposes to the other middleware components, which is not necessarily the final API seen by the user.


Method Summary
 void createEntry(StringPair[] entries)
          Creates new items/entries in the catalog.
 void removeEntry(java.lang.String[] items)
          Removes existing items/entries from the catalog.
 
Methods inherited from interface org.glite.data.catalog.service.meta.MetadataBase
clearAttributes, getAttributes, listAttributes, query, setAttributes
 
Methods inherited from interface org.glite.data.catalog.service.ServiceBase
getInterfaceVersion, getSchemaVersion, getServiceMetadata, getVersion
 
Methods inherited from interface org.glite.data.catalog.service.meta.MetadataSchema
addSchemaAttributes, createSchema, describeSchema, dropSchema, listSchemas, removeSchemaAttributes
 
Methods inherited from interface org.glite.data.catalog.service.fas.FASBase
checkPermission, getPermission, setPermission
 

Method Detail

createEntry

public void createEntry(StringPair[] entries)
                 throws InvalidArgumentException,
                        InternalException,
                        ExistsException,
                        NotExistsException,
                        AuthorizationException
Creates new items/entries in the catalog.

Each item/entry is associated with an existing schema, and though with the attributes which belong to this schema. If an implementation does not care about having different schemas associated with a group of entries in the catalog, then this attribute is ignored and the structure seen by the client is a flat catalog.

The entries passed in the method are pairs of {item identifier, schema name}. The item identifier is a string which must be unique in the catalog. The schema name is the name of the schema containing the attributes to be associated with the new entry.

Parameters:
entries - The new entries to be inserted in the catalog as {item, schemaName} pairs.
Throws:
AuthorizationException - No access for creating new entries/items.
ExistsException - The entry/item already exists in the catalog.
NotExistsException - The schema does not exist in the catalog.
InvalidArgumentException - The given string identifier for the new item/entry is invalid.
InternalException - Any other error on the server side (i.e. database down).

Semantic description of the method:
First steps performed: The following steps are performed for each entry passed in the array:
  • Check if the identifier given for the new entry is valid:
    if it is not, throw InvalidArgumentException.
  • Check if the entry already exists in the catalog:
    if it does, throw ExistsException.
  • Check if the schema exists in the catalog - this step can be ignored if there is no schema concept in the implementation:
    if it does not, throw NotExistsException.
  • Create the new entry in the catalog.
See Also:
org.glite.data.catalog.service.meta, MetadataSchema, StringPair

removeEntry

public void removeEntry(java.lang.String[] items)
                 throws AuthorizationException,
                        NotExistsException,
                        InternalException
Removes existing items/entries from the catalog.

The concrete semantics of this operation are left to the implementation. It may be that all entries should be deleted even if attributes are set, or that entries should only be deleted if no associated attributes have values set.

Parameters:
items - The string identifiers of the items/entries to be removed from the catalog.
Throws:
AuthorizationException - No access for deleting entries/items.
NotExistsException - The entry/item does not exist in the catalog.
InternalException - Any other error on the server side (i.e. database down).

Semantic description of the method:
First steps performed:
  • Check if client is allowed to delete the items/entries from the catalog:
    if it is not, throw AuthorizationException.
The following steps are performed for each item/entry:
  • Check if the item exists in the catalog:
    if it does not, throw NotExistsException.
  • Remove the item from the catalog.
See Also:
org.glite.data.catalog.service.meta


Copyright © 2004 EU-EGEE