-
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cleanUpModelID
public static java.lang.String cleanUpModelID(java.lang.String modelID)
createEmptyModel
public abstract SourceModel createEmptyModel()
createRelativeModelID
public java.lang.String createRelativeModelID(SourceModel src,
java.lang.String absoluteID)
- Change an absolute ModelID into a relative one.
- Parameters:
src
- The SourceModel from which the ID should be evaluatedabsoluteID
- The absolute ModelID to convert
- Returns:
- a relative ModelID.
createRelativeModelID
public static java.lang.String createRelativeModelID(java.lang.String srcID,
java.lang.String absoluteID)
- Parameters:
srcID
- absoluteID
-
- Returns:
delete
public boolean delete(java.lang.String modelID)
throws java.lang.SecurityException,
java.io.IOException
- Throws:
java.lang.SecurityException
java.io.IOException
deleteFromStore
public void deleteFromStore(java.lang.String modelID)
throws java.lang.SecurityException,
java.io.IOException
- Throws:
java.lang.SecurityException
java.io.IOException
getAllModelIDs
public abstract java.util.SortedSet getAllModelIDs()
getDerivableStartingTemplates
public java.util.Collection getDerivableStartingTemplates()
- Will return a list of Strings, where the Strings are the ModelID's of Template Models
(i.e. the ones to use as sources of new Models).
This can be overridden by the child class, if it makes sense.
- Returns:
- A
List
of String
objects identifying
models from which new models may be derived. These are modelID's, not Filenames!
getExternalModelProperties
public static ExternalModelProperties getExternalModelProperties()
getManager
public static SourceModelManager getManager()
load
public SourceModel load(java.lang.String modelID,
java.lang.String referenceModel)
- Load a SourceModel
- Parameters:
modelID
- The relative reference to resolve and load.referenceModel
- is used as a starting point from which the
relativeModelID should be evaluated. Can be null if the model
reference isn't relative.
modelExists
public boolean modelExists(java.lang.String modelID)
processModel
public void processModel(java.lang.String modelID)
resolveRelativeModelID
public static java.lang.String resolveRelativeModelID(java.lang.String srcID,
java.lang.String relativeID)
- Change a relative ModelID into an absolute one.
- Parameters:
srcID
- The Model from which the ID should be evaluatedrelativeID
- The relative ModelID to convert
- Returns:
- an absolute ModelID, suitable for passing to the load method, for example.
save
public void save(SourceModel src)
throws java.io.IOException
- Throws:
java.io.IOException
saveAs
public SourceModel saveAs(SourceModel src,
java.lang.String modelID)
throws java.io.IOException
- Throws:
java.io.IOException
shutdown
public void shutdown()
- Shutdown a shutdown-aware object. If the shutdown cannot be completed for some reason,
then an exception can be thrown.
- Specified by:
shutdown
in interface com.bowstreet.servlet.ObjectLifeCycleHandler.ShutdownAwareObject
- Throws:
java.lang.Exception
- when shutdown cannot be completed.
translateFilenameToModelID
public abstract java.lang.String translateFilenameToModelID(java.lang.String filename,
boolean shouldExist)
- Will return the ModelID that is equivalent to this filename.
- Parameters:
filename
- The filename to translateshouldExist
- If true, will confirm that file exists
- Returns:
- equivalent ModelID -- null if can't be converted or if shouldExist is true and it doesn't exist
translateModelIDToFilename
public abstract java.lang.String translateModelIDToFilename(java.lang.String modelID,
boolean shouldExist)
- Will return the filename that is equivalent to this modelID.
- Parameters:
modelID
- The modelID to translateshouldExist
- If true, will confirm that model exists
- Returns:
- equivalent filename -- null if can't be converted or if shouldExist is true and it doesn't exist
Copyright © 2009 IBM. All Rights Reserved.