|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.web.ApplicationSetup
Automates the creation and setup of ApplicationType
s.
Important note. WhenApplicationSetup setup = new ApplicationSetup(s_log); setup.setApplicationObjectType(SomeApp.BASE_DATA_OBJECT_TYPE); setup.setKey("some-app"); setup.setTitle("Some App"); setup.setInstantiator(new ACSObjectInstantiator() { protected DomainObject doNewInstance(DataObject dataObject) { return new SomeApp(dataObject); } }); setup.run();
Application
s are
used in the context of old-style apps that use
SiteNode
s and PackageType
s, it is
important to use the setKey("some-string-key")
so that
your new applications can interoperate fluidly with the legacy
applications. Use of the setKey
method ensures that
your application will, behind the scenes, use site nodes and
package instances, in addition to the Application
object, to represent each new mountable application. As a result,
legacy code for managing and dispatching applications will work
with both your old and your new applications.
ApplicationType
Field Summary | |
protected org.apache.log4j.Category |
m_category
|
protected String |
m_description
|
protected String |
m_dispatcherClass
|
protected DomainObjectInstantiator |
m_instantiator
|
protected boolean |
m_isSingleton
|
protected boolean |
m_isWorkspaceApplication
|
protected String |
m_key
|
protected PackageType |
m_packageType
|
protected String |
m_stylesheet
|
protected String |
m_title
|
protected String |
m_typeName
|
static String |
versionId
|
Constructor Summary | |
ApplicationSetup(org.apache.log4j.Category category)
|
Method Summary | |
protected void |
notice(String message)
|
protected ApplicationType |
process()
|
ApplicationType |
run()
After all the properties are set, validates and installs the specified application type. |
void |
setApplicationObjectType(String typeName)
Sets the object type of the application instances this application type represents. |
void |
setDescription(String description)
Sets the description of the installed application type. |
void |
setDispatcherClass(String dispatcherClass)
Sets the dispatcher to use for appliactions of this type. |
void |
setInstantiator(DomainObjectInstantiator instantiator)
Sets the instantiator used by DomainObjectFactory to resurrect specific
domain classes from data objects. |
void |
setKey(String key)
Sets a key for use in creating a package type and, later, site node objects, as used by older applications, to match the new application type. |
void |
setPackageType(PackageType packageType)
Sets the package type to use to represent your application under the older package instance and site node approach. |
void |
setPortalApplication(boolean isWorkspaceApplication)
Marks this applications of this type as ones that do or do not belong to a "portal", a special application type that collects child applications together for presentation and navigation purposes. |
void |
setSingleton(boolean isSingleton)
Sets whether there can be more than one application of this type in the system. |
void |
setStylesheet(String stylesheet)
Sets the stylesheet to use for applications of this type. |
void |
setTitle(String title)
Sets the title of the installed application type. |
void |
setWorkspaceApplication(boolean isWorkspaceApplication)
This method is an alternative to setPortalApplication(boolean) . |
protected List |
validate()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String versionId
protected org.apache.log4j.Category m_category
protected String m_title
protected String m_description
protected String m_typeName
protected DomainObjectInstantiator m_instantiator
protected String m_key
protected PackageType m_packageType
protected boolean m_isWorkspaceApplication
protected boolean m_isSingleton
protected String m_stylesheet
protected String m_dispatcherClass
Constructor Detail |
public ApplicationSetup(org.apache.log4j.Category category)
Method Detail |
public void setKey(String key)
key
- the String
key to use to generate a
package type corresponding to the new application typepublic void setPackageType(PackageType packageType)
packageType
- a PackageType
to use behind the
new application typepublic void setTitle(String title)
public void setDescription(String description)
public void setApplicationObjectType(String typeName)
public void setInstantiator(DomainObjectInstantiator instantiator)
DomainObjectFactory
to resurrect specific
domain classes from data objects.
public void setWorkspaceApplication(boolean isWorkspaceApplication)
setPortalApplication(boolean)
. It does the same thing.
public void setPortalApplication(boolean isWorkspaceApplication)
public void setSingleton(boolean isSingleton)
public void setStylesheet(String stylesheet)
public void setDispatcherClass(String dispatcherClass)
protected void notice(String message)
public ApplicationType run()
protected List validate()
protected ApplicationType process()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |