com.vinculumtech.carrierwave.plansource
Class GraphPlanRepositorySource

java.lang.Object
  extended bycom.vinculumtech.carrierwave.plansource.GraphPlanRepositorySource
All Implemented Interfaces:
GraphPlanSource

public class GraphPlanRepositorySource
extends java.lang.Object
implements GraphPlanSource

Version:
$Id: //depot/carrierwave/src/shared/com/vinculumtech/carrierwave/plansource/GraphPlanRepositorySource.java#8 $

Field Summary
static java.lang.String DEFAULT_REPOSITORY_ROOT
           
static java.lang.String GRAPHPLAN_EXT
           
 
Constructor Summary
GraphPlanRepositorySource()
           
GraphPlanRepositorySource(java.lang.String repositoryRoot)
           
GraphPlanRepositorySource(java.lang.String repositoryRoot, java.lang.String sourceName)
           
GraphPlanRepositorySource(java.lang.String repositoryRoot, java.lang.String sourceName, int authorityOrder)
           
 
Method Summary
 java.lang.Integer getAuthorityOrder()
          Returns this GraphPlanSource instances authority value.
 java.lang.String getRepositoryRoot()
           
 java.lang.String getSourceDescription()
           
 java.lang.String getSourceName()
           
 boolean isReadOnly()
           
 java.util.List listGraphPlanNames()
          Returns a list of available graph plan names.
 boolean removeGraphPlan(java.lang.String graphPlanName)
          If graphPlanName is versioned, only that version will be removed.
 GraphPlan retrieveGraphPlan(java.lang.String graphPlanName)
          Returns a GraphPlan with the given graphPlanName from the repsoitory.
 void setAuthorityOrder(int authorityOrder)
           
 void setRepositoryRoot(java.lang.String repositoryRoot)
           
 void setSourceDescription(java.lang.String sourceDescription)
           
 void setSourceName(java.lang.String sourceName)
           
 void storeGraphPlan(GraphPlan graphPlan)
          Saves the given GraphPlan in the repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_REPOSITORY_ROOT

public static java.lang.String DEFAULT_REPOSITORY_ROOT

GRAPHPLAN_EXT

public static java.lang.String GRAPHPLAN_EXT
Constructor Detail

GraphPlanRepositorySource

public GraphPlanRepositorySource()

GraphPlanRepositorySource

public GraphPlanRepositorySource(java.lang.String repositoryRoot)

GraphPlanRepositorySource

public GraphPlanRepositorySource(java.lang.String repositoryRoot,
                                 java.lang.String sourceName)

GraphPlanRepositorySource

public GraphPlanRepositorySource(java.lang.String repositoryRoot,
                                 java.lang.String sourceName,
                                 int authorityOrder)
Method Detail

setRepositoryRoot

public void setRepositoryRoot(java.lang.String repositoryRoot)

getRepositoryRoot

public java.lang.String getRepositoryRoot()

setSourceName

public void setSourceName(java.lang.String sourceName)

getSourceName

public java.lang.String getSourceName()
Specified by:
getSourceName in interface GraphPlanSource
Returns:
the name of this GraphPlanSource instance

setSourceDescription

public void setSourceDescription(java.lang.String sourceDescription)

getSourceDescription

public java.lang.String getSourceDescription()
Specified by:
getSourceDescription in interface GraphPlanSource
Returns:
a String describing this GraphPlanSource instance

retrieveGraphPlan

public GraphPlan retrieveGraphPlan(java.lang.String graphPlanName)
                            throws GraphPlanException
Returns a GraphPlan with the given graphPlanName from the repsoitory.

Specified by:
retrieveGraphPlan in interface GraphPlanSource
Parameters:
graphPlanName -
Returns:
the GraphPlan designaged by the given graphPlanName
Throws:
GraphPlanException

removeGraphPlan

public boolean removeGraphPlan(java.lang.String graphPlanName)
                        throws GraphPlanException
If graphPlanName is versioned, only that version will be removed. Otherwise all version will be removed.

Specified by:
removeGraphPlan in interface GraphPlanSource
Parameters:
graphPlanName -
Returns:
Throws:
GraphPlanException

storeGraphPlan

public void storeGraphPlan(GraphPlan graphPlan)
                    throws GraphPlanException
Saves the given GraphPlan in the repository.

Specified by:
storeGraphPlan in interface GraphPlanSource
Parameters:
graphPlan - the GraphPlan instance to store
Throws:
GraphPlanException

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface GraphPlanSource
Returns:
true if GraphPlan instances can not be stored or modifed in this GraphPlanSource instance

getAuthorityOrder

public java.lang.Integer getAuthorityOrder()
Description copied from interface: GraphPlanSource
Returns this GraphPlanSource instances authority value. The higher the authority value, the higher in precedence a given source is queried for a given GraphPlan by name.

Specified by:
getAuthorityOrder in interface GraphPlanSource
Returns:
the 'authority' value

setAuthorityOrder

public void setAuthorityOrder(int authorityOrder)

listGraphPlanNames

public java.util.List listGraphPlanNames()
                                  throws GraphPlanException
Description copied from interface: GraphPlanSource
Returns a list of available graph plan names.

Specified by:
listGraphPlanNames in interface GraphPlanSource
Throws:
GraphPlanException


Copyright (C) 2002 Vinculum Technologies, Inc. All Rights Reserved.