|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthelma.framework.core.Prototype
public final class Prototype
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.
Constructor Summary | |
---|---|
Prototype(java.lang.String name,
Repository repository,
Application app)
Creates a new Prototype object. |
Method Summary | |
---|---|
void |
addRepository(Repository repository,
boolean update)
Adds an repository to the list of repositories |
void |
checkForUpdates()
Check a prototype for new or updated resources. |
Application |
getApplication()
Return the application this prototype is a part of |
java.util.Iterator |
getCodeResources()
Return an iterator over this prototype's code resoruces. |
DbMapping |
getDbMapping()
Get the DbMapping associated with this prototype |
java.lang.String |
getLowerCaseName()
Return this prototype's name in lower case letters |
java.lang.String |
getName()
Return this prototype's name |
Prototype |
getParentPrototype()
Get the parent prototype from which we inherit, or null if we are top of the line. |
Repository[] |
getRepositories()
Returns an array of repositories containing code for this prototype. |
Resource[] |
getResources()
Returns the list of resources in this prototype's repositories. |
java.util.Map |
getScriptableSkinMap()
Get a map containing this prototype's skins as strings |
java.util.Map |
getScriptableSkinMap(java.lang.Object[] skinpath)
Get a map containing this prototype's skins as strings, overloaded by the skins found in the given skinpath. |
Skin |
getSkin(java.lang.String skinName,
java.lang.String parentName,
java.lang.String subName)
Get a skin for this prototype. |
java.util.Iterator |
getSkinResources()
Return an iterator over this prototype's skin resoruces. |
ResourceProperties |
getTypeProperties()
Get the prototype's aggregated type.properties |
boolean |
isInstanceOf(java.lang.String pname)
Check if the given prototype is within this prototype's parent chain. |
long |
lastCodeUpdate()
Get the last time any script has been re-read for this prototype. |
void |
markUpdated()
Signal that some script in this prototype has been re-read from disk and needs to be re-compiled by the evaluators. |
void |
registerParents(java.util.Map handlers,
java.lang.Object obj)
Register an object as handler for all our parent prototypes, but only if a handler by that prototype name isn't registered yet. |
void |
setParentPrototype(Prototype parent)
Set the parent prototype of this prototype, i.e. |
java.lang.String |
toString()
Return a string representing this prototype. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Prototype(java.lang.String name, Repository repository, Application app)
name
- the prototype's namerepository
- the first prototype's repositoryapp
- the application this prototype is a part ofMethod Detail |
---|
public Application getApplication()
public void addRepository(Repository repository, boolean update) throws java.io.IOException
repository
- repository to addupdate
- indicates whether to immediately update the prototype with the new code
java.io.IOException
- if reading/updating from the repository failspublic void checkForUpdates()
public Resource[] getResources()
public Repository[] getRepositories()
public void setParentPrototype(Prototype parent)
public Prototype getParentPrototype()
public final boolean isInstanceOf(java.lang.String pname)
public final void registerParents(java.util.Map handlers, java.lang.Object obj)
public DbMapping getDbMapping()
public Skin getSkin(java.lang.String skinName, java.lang.String parentName, java.lang.String subName) throws java.io.IOException
java.io.IOException
public java.lang.String getName()
public java.lang.String getLowerCaseName()
public long lastCodeUpdate()
public void markUpdated()
public ResourceProperties getTypeProperties()
public java.util.Iterator getCodeResources()
public java.util.Iterator getSkinResources()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Map getScriptableSkinMap()
public java.util.Map getScriptableSkinMap(java.lang.Object[] skinpath)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |