org.apache.jetspeed.om.portlet.impl
Class PortletApplicationDefinitionImpl

java.lang.Object
  extended by org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl
All Implemented Interfaces:
java.io.Serializable, MutablePortletApplication, PortletApplication, Support, org.apache.pluto.om.Model, org.apache.pluto.om.portlet.PortletApplicationDefinition

public class PortletApplicationDefinitionImpl
extends java.lang.Object
implements MutablePortletApplication, java.io.Serializable, Support

Since:
1.0
Version:
$Id: PortletApplicationDefinitionImpl.java 553014 2007-07-03 23:10:53Z ate $
Author:
Paul Spencer, Scott T. Weaver
See Also:
Serialized Form

Field Summary
protected  long webApplicationId
          PK of this Portlet Application's Web Application
 
Fields inherited from interface org.apache.jetspeed.om.common.portlet.MutablePortletApplication
INTERNAL, LOCAL, PREFS_ROOT, WEBAPP
 
Constructor Summary
PortletApplicationDefinitionImpl()
          Creates a new instance of BaseApplication
 
Method Summary
 void addCustomPortletMode(CustomPortletMode customPortletMode)
           
 void addCustomWindowState(CustomWindowState customWindowState)
           
 void addJetspeedService(JetspeedServiceReference service)
          Adds a Jetspeed component service to the collection of component services allowed for this application.
 void addPortletDefinition(org.apache.pluto.om.portlet.PortletDefinition pd)
           
 void addUserAttribute(java.lang.String userName, java.lang.String description)
          Adds a user attribute to the user attribute set.
 void addUserAttribute(UserAttribute userAttribute)
          Adds a user attribute to the user attribute set.
 void addUserAttributeRef(UserAttributeRef userAttributeRef)
          Adds a user attribute ref to the user attribute ref set.
 java.lang.String getApplicationIdentifier()
           
 int getApplicationType()
          Gets the Portlet Application type.
 long getChecksum()
          The checksum on the portlet XML from the last deployment
 javax.portlet.PortletMode getCustomPortletMode(javax.portlet.PortletMode mode)
           
 java.util.Collection getCustomPortletModes()
           
 javax.portlet.WindowState getCustomWindowState(javax.portlet.WindowState state)
           
 java.util.Collection getCustomWindowStates()
           
 java.lang.String getDescription()
           
 org.apache.pluto.om.common.ObjectID getId()
           
 java.lang.String getJetspeedSecurityConstraint()
           Get the Jetspeed Security Constraint reference for this portlet application.
 java.util.Collection getJetspeedServices()
          Gets a collection of all Jetspeed Services allowed for this application.
 javax.portlet.PortletMode getMappedPortletMode(javax.portlet.PortletMode mode)
           
 javax.portlet.WindowState getMappedWindowState(javax.portlet.WindowState state)
           
 GenericMetadata getMetadata()
          Returns the metadata from the extended jetspeed-portlet.xml
protected  java.util.Collection getMetadataFields()
           
 java.lang.String getName()
          Gets the name of the Portlet Application.
 org.apache.pluto.om.portlet.PortletDefinition getPortletDefinitionByName(java.lang.String name)
          Finds a portlet by portlet name, searching this portlet application's collection.
 org.apache.pluto.om.portlet.PortletDefinitionList getPortletDefinitionList()
           
 java.util.Collection getPortletDefinitions()
           
 java.util.Collection getSupportedPortletModes()
           
 java.util.Collection getSupportedWindowStates()
           
 java.util.Collection getUserAttributeRefs()
          Gets the collection of user attribute refs associated with this portlet application.
 java.util.Collection getUserAttributes()
          Gets the collection of user attributes associated with this portlet application.
 java.lang.String getVersion()
           
 org.apache.pluto.om.servlet.WebApplicationDefinition getWebApplicationDefinition()
           
 boolean isLayoutApplication()
          Returns true if the portlet application is a layout application Layouts are not "general" portlets, but instead used to group together other layouts and portlet fragments
 void postLoad(java.lang.Object parameter)
           
 void setApplicationIdentifier(java.lang.String applicationIdentifier)
           
 void setApplicationType(int type)
          Sets the Portlet Application type.
 void setChecksum(long checksum)
          The checksum on the portlet XML from the last deployment
 void setCustomPortletModes(java.util.Collection customPortletModes)
           
 void setCustomWindowStates(java.util.Collection customWindowStates)
           
 void setDescription(java.lang.String string)
           
 void setJetspeedSecurityConstraint(java.lang.String constraint)
           Set the Jetspeed Security Constraint reference for this portlet application.
 void setMetadata(GenericMetadata metadata)
          Sets the metadata from the extended jetspeed-portlet.xml
protected  void setMetadataFields(java.util.Collection metadataFields)
           
 void setName(java.lang.String name)
           
 void setPortletDefinitionList(org.apache.pluto.om.portlet.PortletDefinitionList portlets)
           
 void setUserAttributeRefs(java.util.Collection userAttributeRefs)
          Sets a user-attribute-ref to the collection of user attribute refs associated with this portlet application.
 void setUserAttributes(java.util.Collection userAttributes)
          Sets a user-attribute to the collection of user attributes associated with this portlet application.
 void setVersion(java.lang.String version)
           
 void setWebApplicationDefinition(org.apache.pluto.om.servlet.WebApplicationDefinition wad)
          Associates the web application definition with this portlet application defintion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

webApplicationId

protected long webApplicationId
PK of this Portlet Application's Web Application

Constructor Detail

PortletApplicationDefinitionImpl

public PortletApplicationDefinitionImpl()
Creates a new instance of BaseApplication

Method Detail

getId

public org.apache.pluto.om.common.ObjectID getId()
Specified by:
getId in interface org.apache.pluto.om.portlet.PortletApplicationDefinition
See Also:
PortletApplicationDefinition.getId()

getName

public java.lang.String getName()
Description copied from interface: PortletApplication
Gets the name of the Portlet Application.

Specified by:
getName in interface PortletApplication
Returns:
Name of the application
See Also:
org.apache.jetspeed.om.common.Application#getName()

setName

public void setName(java.lang.String name)
Specified by:
setName in interface MutablePortletApplication
See Also:
org.apache.jetspeed.om.common.Application#setName(String)

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface org.apache.pluto.om.portlet.PortletApplicationDefinition
See Also:
org.apache.jetspeed.om.common.Application#getVersion()

setVersion

public void setVersion(java.lang.String version)
Specified by:
setVersion in interface MutablePortletApplication
See Also:
org.apache.jetspeed.om.common.Application#setVersion(String)

getWebApplicationDefinition

public org.apache.pluto.om.servlet.WebApplicationDefinition getWebApplicationDefinition()
Specified by:
getWebApplicationDefinition in interface org.apache.pluto.om.portlet.PortletApplicationDefinition
Returns:

getPortletDefinitionList

public org.apache.pluto.om.portlet.PortletDefinitionList getPortletDefinitionList()
Specified by:
getPortletDefinitionList in interface org.apache.pluto.om.portlet.PortletApplicationDefinition
See Also:
PortletApplicationDefinition.getPortletDefinitionList()

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface PortletApplication
Returns:

setDescription

public void setDescription(java.lang.String string)
Specified by:
setDescription in interface MutablePortletApplication
Parameters:
string -

setWebApplicationDefinition

public void setWebApplicationDefinition(org.apache.pluto.om.servlet.WebApplicationDefinition wad)
Description copied from interface: MutablePortletApplication
Associates the web application definition with this portlet application defintion.

Specified by:
setWebApplicationDefinition in interface MutablePortletApplication
See Also:
MutablePortletApplication.setWebApplicationDefinition(org.apache.pluto.om.servlet.WebApplicationDefinition)

addPortletDefinition

public void addPortletDefinition(org.apache.pluto.om.portlet.PortletDefinition pd)
Specified by:
addPortletDefinition in interface MutablePortletApplication
See Also:
MutablePortletApplication.addPortletDefinition(org.apache.pluto.om.portlet.PortletDefinition)

getPortletDefinitions

public java.util.Collection getPortletDefinitions()
Specified by:
getPortletDefinitions in interface PortletApplication
Returns:
See Also:
PortletApplication.getPortletDefinitions()

getPortletDefinitionByName

public org.apache.pluto.om.portlet.PortletDefinition getPortletDefinitionByName(java.lang.String name)
Description copied from interface: PortletApplication
Finds a portlet by portlet name, searching this portlet application's collection.

Specified by:
getPortletDefinitionByName in interface PortletApplication
Parameters:
name - The portlet name.
Returns:
A Portlet Definition
See Also:
PortletApplication.getPortletDefinitionByName(java.lang.String)

setPortletDefinitionList

public void setPortletDefinitionList(org.apache.pluto.om.portlet.PortletDefinitionList portlets)
Specified by:
setPortletDefinitionList in interface MutablePortletApplication
See Also:
MutablePortletApplication.setPortletDefinitionList(org.apache.pluto.om.portlet.PortletDefinitionList)

setUserAttributeRefs

public void setUserAttributeRefs(java.util.Collection userAttributeRefs)
Description copied from interface: MutablePortletApplication

Sets a user-attribute-ref to the collection of user attribute refs associated with this portlet application.

Specified by:
setUserAttributeRefs in interface MutablePortletApplication
See Also:
MutablePortletApplication.setUserAttributeRefs(java.util.Collection)

getUserAttributeRefs

public java.util.Collection getUserAttributeRefs()
Description copied from interface: PortletApplication

Gets the collection of user attribute refs associated with this portlet application.

Specified by:
getUserAttributeRefs in interface PortletApplication
See Also:
PortletApplication.getUserAttributeRefs()

addUserAttributeRef

public void addUserAttributeRef(UserAttributeRef userAttributeRef)
Description copied from interface: MutablePortletApplication

Adds a user attribute ref to the user attribute ref set.

Specified by:
addUserAttributeRef in interface MutablePortletApplication
Parameters:
userAttributeRef - The user attribute ref.
See Also:
MutablePortletApplication.addUserAttributeRef(org.apache.jetspeed.om.common.UserAttributeRef)

addUserAttribute

public void addUserAttribute(UserAttribute userAttribute)
Description copied from interface: MutablePortletApplication

Adds a user attribute to the user attribute set.

Specified by:
addUserAttribute in interface MutablePortletApplication
Parameters:
userAttribute - The user attribute.
See Also:
MutablePortletApplication.addUserAttribute(org.apache.jetspeed.om.common.UserAttribute)

addUserAttribute

public void addUserAttribute(java.lang.String userName,
                             java.lang.String description)
Description copied from interface: MutablePortletApplication

Adds a user attribute to the user attribute set.

Specified by:
addUserAttribute in interface MutablePortletApplication
See Also:
MutablePortletApplication.addUserAttribute(java.lang.String, java.lang.String)

setUserAttributes

public void setUserAttributes(java.util.Collection userAttributes)
Description copied from interface: MutablePortletApplication

Sets a user-attribute to the collection of user attributes associated with this portlet application.

Specified by:
setUserAttributes in interface MutablePortletApplication
See Also:
MutablePortletApplication.setUserAttributes(java.util.Collection)

getUserAttributes

public java.util.Collection getUserAttributes()
Description copied from interface: PortletApplication

Gets the collection of user attributes associated with this portlet application.

Specified by:
getUserAttributes in interface PortletApplication
See Also:
PortletApplication.getUserAttributes()

setApplicationIdentifier

public void setApplicationIdentifier(java.lang.String applicationIdentifier)
Specified by:
setApplicationIdentifier in interface MutablePortletApplication
See Also:
MutablePortletApplication.setApplicationIdentifier(java.lang.String)

getApplicationIdentifier

public java.lang.String getApplicationIdentifier()
Specified by:
getApplicationIdentifier in interface PortletApplication
See Also:
PortletApplication.getApplicationIdentifier()

setApplicationType

public void setApplicationType(int type)
Description copied from interface: MutablePortletApplication
Sets the Portlet Application type. Valid values are:

MutablePortletApplication.WEBAPP - A standard web application, stored in the web application server's web application space.

MutablePortletApplication.LOCAL - A local portlet application stored within Jetspeed's web application.

Specified by:
setApplicationType in interface MutablePortletApplication
Parameters:
type - The type of portlet application.
See Also:
MutablePortletApplication.setApplicationType(int)

getApplicationType

public int getApplicationType()
Description copied from interface: PortletApplication
Gets the Portlet Application type. Valid values are:

MutablePortletApplication.WEBAPP - A standard web application, stored in the web application server's web application space.

MutablePortletApplication.LOCAL - A local portlet application stored within Jetspeed's web application.

Specified by:
getApplicationType in interface PortletApplication
Returns:
The type of portlet application.
See Also:
PortletApplication.getApplicationType()

getMetadata

public GenericMetadata getMetadata()
Description copied from interface: PortletApplication
Returns the metadata from the extended jetspeed-portlet.xml

Specified by:
getMetadata in interface PortletApplication
Returns:
Jetspeed specific metadata
See Also:
PortletApplication.getMetadata()

setMetadata

public void setMetadata(GenericMetadata metadata)
Description copied from interface: MutablePortletApplication
Sets the metadata from the extended jetspeed-portlet.xml

Specified by:
setMetadata in interface MutablePortletApplication
See Also:
MutablePortletApplication.setMetadata(org.apache.jetspeed.om.common.GenericMetadata)

getMetadataFields

protected java.util.Collection getMetadataFields()
Returns:

setMetadataFields

protected void setMetadataFields(java.util.Collection metadataFields)
Parameters:
collection -

getJetspeedServices

public java.util.Collection getJetspeedServices()
Description copied from interface: PortletApplication
Gets a collection of all Jetspeed Services allowed for this application.

Specified by:
getJetspeedServices in interface PortletApplication
Returns:
The collection of services of type JetspeedServiceReference.
See Also:
JetspeedServiceReference

addJetspeedService

public void addJetspeedService(JetspeedServiceReference service)
Description copied from interface: MutablePortletApplication
Adds a Jetspeed component service to the collection of component services allowed for this application.

Specified by:
addJetspeedService in interface MutablePortletApplication
Parameters:
service - The component service being added.

getChecksum

public long getChecksum()
Description copied from interface: MutablePortletApplication
The checksum on the portlet XML from the last deployment

Specified by:
getChecksum in interface MutablePortletApplication
Returns:

setChecksum

public void setChecksum(long checksum)
Description copied from interface: MutablePortletApplication
The checksum on the portlet XML from the last deployment

Specified by:
setChecksum in interface MutablePortletApplication

postLoad

public void postLoad(java.lang.Object parameter)
              throws java.lang.Exception
Specified by:
postLoad in interface Support
Throws:
java.lang.Exception

getCustomPortletModes

public java.util.Collection getCustomPortletModes()
Specified by:
getCustomPortletModes in interface PortletApplication

addCustomPortletMode

public void addCustomPortletMode(CustomPortletMode customPortletMode)

setCustomPortletModes

public void setCustomPortletModes(java.util.Collection customPortletModes)

getMappedPortletMode

public javax.portlet.PortletMode getMappedPortletMode(javax.portlet.PortletMode mode)
Specified by:
getMappedPortletMode in interface PortletApplication

getCustomPortletMode

public javax.portlet.PortletMode getCustomPortletMode(javax.portlet.PortletMode mode)
Specified by:
getCustomPortletMode in interface PortletApplication

getSupportedPortletModes

public java.util.Collection getSupportedPortletModes()
Specified by:
getSupportedPortletModes in interface PortletApplication

getCustomWindowStates

public java.util.Collection getCustomWindowStates()
Specified by:
getCustomWindowStates in interface PortletApplication

addCustomWindowState

public void addCustomWindowState(CustomWindowState customWindowState)

setCustomWindowStates

public void setCustomWindowStates(java.util.Collection customWindowStates)

getMappedWindowState

public javax.portlet.WindowState getMappedWindowState(javax.portlet.WindowState state)
Specified by:
getMappedWindowState in interface PortletApplication

getCustomWindowState

public javax.portlet.WindowState getCustomWindowState(javax.portlet.WindowState state)
Specified by:
getCustomWindowState in interface PortletApplication

getSupportedWindowStates

public java.util.Collection getSupportedWindowStates()
Specified by:
getSupportedWindowStates in interface PortletApplication

getJetspeedSecurityConstraint

public java.lang.String getJetspeedSecurityConstraint()
Description copied from interface: PortletApplication

Get the Jetspeed Security Constraint reference for this portlet application. This security constraint name references a Jetspeed-specific Security Constraint. Security Constraints are not Java Security Permissions, but a Jetspeed specific way of securing portlets, also known as PSML constraints. See the page.security file for examples of defining security constraint definitions. If a Jetspeed Security Constraint is not defined for a portlet, the constraint applied will then fallback to the constraint defined for the portlet application. If the portlet application does not define a constraint, then no security constraints will be applied to this portlet. Security constraints for a portlet are normally checking during the render process of a portlet.

Specified by:
getJetspeedSecurityConstraint in interface PortletApplication
Returns:
The name of the Security Definition applied to this portlet, defined in the Jetspeed Security Constraints

setJetspeedSecurityConstraint

public void setJetspeedSecurityConstraint(java.lang.String constraint)
Description copied from interface: MutablePortletApplication

Set the Jetspeed Security Constraint reference for this portlet application. This security constraint name references a Jetspeed-specific Security Constraint. Security Constraints are not Java Security Permissions, but a Jetspeed specific way of securing portlets, also known as PSML constraints. See the page.security file for examples of defining security constraint definitions. If the portlet application does not define a constraint, then no security constraints will be applied to this portlet. Security constraints for a portlet are normally checking during the render process of a portlet.

Specified by:
setJetspeedSecurityConstraint in interface MutablePortletApplication
Parameters:
constraint - The name of the Security Definition defined in the Jetspeed Security Constraints

isLayoutApplication

public boolean isLayoutApplication()
Description copied from interface: PortletApplication
Returns true if the portlet application is a layout application Layouts are not "general" portlets, but instead used to group together other layouts and portlet fragments

Specified by:
isLayoutApplication in interface PortletApplication
Returns:
true when this app is a Jetspeed layout application


Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.