com.sun.ebxml.registry.repository
Interface RepositoryManager

All Known Implementing Classes:
AbstractRepositoryManager

public interface RepositoryManager

The Repository Manager interface implemented by RepositoryManagers that control inserting, updating and deleting repository items.

Version:
$Version: $ [$Date: 2002/11/09 22:42:39 $]
Author:
Adrian Chong, Peter Burgess

Method Summary
 void delete(java.util.ArrayList ids)
          Delete multiple repository items.
 void delete(java.lang.String id)
          Delete the repository item.
 long getItemSize(java.lang.String itemId)
          Get the size of a repository item in bytes.
 long getItemsSize(java.util.ArrayList ids)
          Get the total size an ArrayList of repository item in bytes.
 RepositoryItem getRepositoryItem(java.lang.String id)
          Returns the RepositoryItem with the given unique ID.
 java.lang.String getRepositoryItemPath(java.lang.String id)
          Gets the path for a RepositoryItem given its id.
 void insert(RepositoryItem item)
          Insert the repository item.
 java.util.ArrayList itemsExist(java.util.ArrayList ids)
          Return a ArrayList of non-existent repository items
 void update(RepositoryItem item)
          Updates a RepositoryItem.
 

Method Detail

getRepositoryItemPath

public java.lang.String getRepositoryItemPath(java.lang.String id)
                                       throws RegistryException
Gets the path for a RepositoryItem given its id.

RegistryException

insert

public void insert(RepositoryItem item)
            throws RegistryException
Insert the repository item.

Parameters:
item - The repository item.
RegistryException

getRepositoryItem

public RepositoryItem getRepositoryItem(java.lang.String id)
                                 throws RegistryException
Returns the RepositoryItem with the given unique ID.

Parameters:
id - Unique id for repository item
Returns:
RepositoryItem instance
Throws:
RegistryException

delete

public void delete(java.lang.String id)
            throws RegistryException
Delete the repository item.

Parameters:
id - A unique id (UUID or URN)
Throws:
RegistryException - if the item does not exist

delete

public void delete(java.util.ArrayList ids)
            throws RegistryException
Delete multiple repository items.

Parameters:
ids - ArrayList of repositoryItem ids.
Throws:
RegistryException - if any of the item do not exist

update

public void update(RepositoryItem item)
            throws RegistryException
Updates a RepositoryItem.

RegistryException

itemsExist

public java.util.ArrayList itemsExist(java.util.ArrayList ids)
                               throws RegistryException
Return a ArrayList of non-existent repository items

Parameters:
ids - The ArrayList of repository items id.
RegistryException

getItemSize

public long getItemSize(java.lang.String itemId)
                 throws RegistryException
Get the size of a repository item in bytes.

Parameters:
itemId - The id of repository item, with "urn:uuid:".
Returns:
0 if the file does not exist.
RegistryException

getItemsSize

public long getItemsSize(java.util.ArrayList ids)
                  throws RegistryException
Get the total size an ArrayList of repository item in bytes.

Parameters:
ids - ArrayList of repository item ids
Returns:
0 if the no items (or items do not exist).
RegistryException


Copyright © 2001-2003 OASIS. All Rights Reserved.