| java.lang.Object helma.framework.core.Prototype
Prototype | final public class Prototype (Code) | | The Prototype class represents Script prototypes/type defined in a Helma
application. This class manages a prototypes templates, functions and actions
as well as optional information about the mapping of this type to a
relational database table.
|
Inner Class :class ScriptableSkinMap extends WrappedMap | |
Inner Class :class SkinMap extends HashMap | |
lastChecksum | long lastChecksum(Code) | | |
lastCodeUpdate | volatile long lastCodeUpdate(Code) | | |
Prototype | public Prototype(String name, Repository repository, Application app)(Code) | | Creates a new Prototype object.
Parameters: name - the prototype's name Parameters: repository - the first prototype's repository Parameters: app - the application this prototype is a part of |
addRepository | public void addRepository(Repository repository, boolean update) throws IOException(Code) | | Adds an repository to the list of repositories
Parameters: repository - repository to add Parameters: update - indicates whether to immediately update the prototype with the new code throws: IOException - if reading/updating from the repository fails |
checkForUpdates | public synchronized void checkForUpdates()(Code) | | Check a prototype for new or updated resources. After this has been
called the code and skins collections of this prototype should be
up-to-date and the lastCodeUpdate be set if there has been any changes.
|
getApplication | public Application getApplication()(Code) | | Return the application this prototype is a part of
|
getCodeResources | public synchronized Iterator getCodeResources()(Code) | | Return an iterator over this prototype's code resoruces. Synchronized
to not return a collection in a transient state where it is just being
updated by the type manager.
an iterator of this prototype's code resources |
getDbMapping | public DbMapping getDbMapping()(Code) | | Get the DbMapping associated with this prototype
|
getLowerCaseName | public String getLowerCaseName()(Code) | | Return this prototype's name in lower case letters
... |
getName | public String getName()(Code) | | Return this prototype's name
... |
getParentPrototype | public Prototype getParentPrototype()(Code) | | Get the parent prototype from which we inherit, or null
if we are top of the line.
|
getRepositories | public Repository[] getRepositories()(Code) | | Returns an array of repositories containing code for this prototype.
|
getRepositoryChecksum | long getRepositoryChecksum()(Code) | | Get a checksum over this prototype's repositories. This tells us
if any resources were added or removed.
|
getResources | public Resource[] getResources()(Code) | | Returns the list of resources in this prototype's repositories. Used
by checkForUpdates() to see whether there is anything new.
|
getScriptableSkinMap | public Map getScriptableSkinMap()(Code) | | Get a map containing this prototype's skins as strings
a scriptable skin map |
getScriptableSkinMap | public Map getScriptableSkinMap(Object[] skinpath)(Code) | | Get a map containing this prototype's skins as strings, overloaded by the
skins found in the given skinpath.
a scriptable skin map |
getSkin | public Skin getSkin(String skinName, String parentName, String subName) throws IOException(Code) | | Get a skin for this prototype. This only works for skins
residing in the prototype directory, not for skins files in
other locations or database stored skins. If parentName and
subName are defined, the skin may be a subskin of another skin.
|
getSkinResources | public Iterator getSkinResources()(Code) | | Return an iterator over this prototype's skin resoruces. Synchronized
to not return a collection in a transient state where it is just being
updated by the type manager.
an iterator over this prototype's skin resources |
getTypeProperties | public ResourceProperties getTypeProperties()(Code) | | Get the prototype's aggregated type.properties
type.properties |
isInstanceOf | final public boolean isInstanceOf(String pname)(Code) | | Check if the given prototype is within this prototype's parent chain.
|
lastCodeUpdate | public long lastCodeUpdate()(Code) | | Get the last time any script has been re-read for this prototype.
|
markUpdated | public void markUpdated()(Code) | | Signal that some script in this prototype has been
re-read from disk and needs to be re-compiled by
the evaluators.
|
registerParents | final public void registerParents(Map handlers, Object obj)(Code) | | Register an object as handler for all our parent prototypes, but only if
a handler by that prototype name isn't registered yet. This is used to
implement direct over indirect prototype precedence and child over parent
precedence.
|
setParentPrototype | public void setParentPrototype(Prototype parent)(Code) | | Set the parent prototype of this prototype, i.e. the prototype this
prototype inherits from.
|
toString | public String toString()(Code) | | Return a string representing this prototype.
|
|
|