com.sun.ebxml.registry.repository.filesystem
Class FileSystemRepositoryManager

java.lang.Object
  |
  +--com.sun.ebxml.registry.repository.AbstractRepositoryManager
        |
        +--com.sun.ebxml.registry.repository.filesystem.FileSystemRepositoryManager
All Implemented Interfaces:
RepositoryManager

public class FileSystemRepositoryManager
extends AbstractRepositoryManager

FileSystem based Repository Manager to control inserting, updating and deleting repository items.

Version:
$Version: $ [$Date: 2003/03/18 07:56:08 $]
Author:
Adrian Chong, Peter Burgess

Constructor Summary
protected FileSystemRepositoryManager()
           
 
Method Summary
 void delete(java.lang.String id)
          Delete the repository item.
static RepositoryManager getInstance()
          Singleton instance accessor.
 long getItemSize(java.lang.String itemId)
          Get the size of a 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
 
Methods inherited from class com.sun.ebxml.registry.repository.AbstractRepositoryManager
delete, getItemsSize, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemRepositoryManager

protected FileSystemRepositoryManager()
Method Detail

getRepositoryItemPath

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

RegistryException

getInstance

public static RepositoryManager getInstance()
Singleton instance accessor.


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 - It should be the UUID. It will remove "urn:uuid:".
Throws:
RegistryException - if the item does not exist

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. It will remove "urn:uuid:".
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


Copyright © 2001-2003 OASIS. All Rights Reserved.