org.jomc.sequences
Interface SequenceDirectory

Package class diagram package SequenceDirectory

@Generated(value="org.jomc.tools.SourceFileProcessor 1.0",
           comments="See http://jomc.sourceforge.net/jomc/1.0/jomc-tools")
public interface SequenceDirectory

Directory of sequences.

This specification declares a multiplicity of One. An application assembler may provide either no or one implementation of this specification.

Use of class ObjectManager is supported for accessing implementations.

 SequenceDirectory object = ObjectManagerFactory.getObjectManager( getClass().getClassLoader() ).getObject( SequenceDirectory.class );
 SequenceDirectory object = ObjectManagerFactory.getObjectManager( getClass().getClassLoader() ).getObject( SequenceDirectory.class, "implementation name" );
   

This specification applies to Singleton scope. The same singleton object is returned whenever requested.

Version:
$Id: SequenceDirectory.java 2244 2010-06-29 07:58:09Z schulte2005 $
Author:
Christian Schulte 1.0

Method Summary
Modifier and Type Method and Description
 Sequence addSequence(Sequence sequence)
          Adds a sequence to the directory.
 Sequence deleteSequence(String name, long revision)
          Removes a sequence from the directory.
 Sequence editSequence(String name, long revision, Sequence sequence)
          Updates a sequence in the directory.
 BigInteger getCapacityLimit()
          Gets the capacity limit of the directory.
 Sequence getSequence(String name)
          Gets a sequence for a given name.
 BigInteger getSequenceCount()
          Gets the total number of sequences stored in the directory.
 Set<Sequence> searchSequences(String name)
          Searches the directory for sequences matching the given arguments.
 

Method Detail

getSequenceCount

BigInteger getSequenceCount()
                            throws SequencesSystemException
Gets the total number of sequences stored in the directory.

Returns:
The total number of sequences stored in the directory.
Throws:
SequencesSystemException - if getting the total number of sequences fails.

getCapacityLimit

BigInteger getCapacityLimit()
                            throws SequencesSystemException
Gets the capacity limit of the directory.

Returns:
The capacity limit of the directory.
Throws:
SequencesSystemException - if getting the capacity limit fails.

getSequence

Sequence getSequence(String name)
                     throws SequencesSystemException
Gets a sequence for a given name.

Parameters:
name - The name of the sequence to return.
Returns:
The sequence with name name or null if no sequence matching name exists in the directory.
Throws:
SequencesSystemException - if getting the sequence fails.

addSequence

Sequence addSequence(Sequence sequence)
                     throws SequenceVetoException,
                            SequenceExistsException,
                            CapacityLimitException,
                            SequencesSystemException
Adds a sequence to the directory.

Parameters:
sequence - The sequence to add to the directory.
Returns:
The data of the sequence from the directory.
Throws:
SequenceVetoException - if sequence holds illegal values.
SequenceExistsException - if a sequence with the same name already exists.
CapacityLimitException - if the directory's capacity limit has been reached.
SequencesSystemException - if adding the sequence fails.

editSequence

Sequence editSequence(String name,
                      long revision,
                      Sequence sequence)
                      throws SequenceVetoException,
                             SequenceNotFoundException,
                             ConcurrentModificationException,
                             SequencesSystemException
Updates a sequence in the directory.

Parameters:
name - The name of the sequence to update.
revision - The revision of the sequence to update.
sequence - The data to update the directory with.
Returns:
The data of the sequence from the directory.
Throws:
SequenceVetoException - if sequence holds illegal values.
SequenceNotFoundException - if no sequence matching name exists in the directory.
ConcurrentModificationException - if the same sequence got concurrently modified in the directory, that is, revision denotes outdated data.
SequencesSystemException - if editing the sequence fails.

deleteSequence

Sequence deleteSequence(String name,
                        long revision)
                        throws SequenceNotFoundException,
                               ConcurrentModificationException,
                               SequencesSystemException
Removes a sequence from the directory.

Parameters:
name - The name of the sequence to remove.
revision - The revision of the sequence to remove.
Returns:
The data of the removed sequence from the directory.
Throws:
SequenceNotFoundException - if no sequence matching name exists in the directory.
ConcurrentModificationException - if the same sequence got concurrently modified in the directory, that is, revision denotes outdated data.
SequencesSystemException - if deleting the sequence fails.

searchSequences

Set<Sequence> searchSequences(String name)
                              throws SequencesSystemException
Searches the directory for sequences matching the given arguments.

Parameters:
name - Text to select sequences whose name property matches the given text; null to ignore property name in the search.
Returns:
All sequences matching the given criteria.
Throws:
SequencesSystemException - if searching the directory fails.


Copyright © 2005-2010 The JOMC Project. All Rights Reserved.