atg.portal.framework
Interface Gear

All Superinterfaces:
SecuredObject

public interface Gear
extends SecuredObject

Gears are the building blocks for portals. Gears are separate, stand-alone, web applications that are combined together in a portal page. Examples of gears include the News Gear, the Weather Gear, and the Document Exchange Gear.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Method Summary
 int getAccessLevel()
           
 java.lang.String getAuthor()
          Access the author of the gear
 java.util.Date getCreationDate()
          Access the creation date of the gear
 java.lang.String getDescription()
          Deprecated.  
 java.lang.String getDescription(java.util.Locale locale)
          Gets the localized description of this gear, returning a default string if the locale is not recognized.
 atg.portal.alert.AlertParameter getGearAlertParameter(java.lang.String pParam)
          Access a named gear alert parameter
 java.lang.String getGearAlertParameterDefaultValue(java.lang.String pParam)
          Access the default value of the named gear alert parameter
 java.lang.String[] getGearAlertParameterNames()
          Access the names of the gear instance parameters
 GearDefinition getGearDefinition()
          Access the gear definition
 java.lang.String getGearInstanceParameter(java.lang.String pParam)
          Access a named gear instance parameter
 java.lang.String getGearInstanceParameterDefaultValue(java.lang.String pParam)
          Access the default value of the named gear instance parameter
 java.lang.String[] getGearInstanceParameterNames()
          Access the names of the gear instance parameters
 java.lang.String getGearUserParameter(java.lang.String pParam)
          Access a named gear instance parameter
 java.lang.String getGearUserParameterDefaultValue(java.lang.String pParam)
          Access the default value of the named gear instance parameter
 java.util.List getGearUserParameterDefaultValues(java.lang.String pParam)
           
 java.lang.String[] getGearUserParameterNames()
          Access the names of the gear instance parameters
 java.util.List getGearUserParameterValues(java.lang.String prefName)
           
 java.lang.String getId()
          Access the id of the gear
 java.lang.String getLargeImageURL()
          Access a url to the large image for the Gear
 java.util.Date getLastModified()
          Access the last modified date of the gear
 java.lang.String getName()
          Deprecated.  
 java.lang.String getName(java.util.Locale locale)
          Gets the localized name of this gear, returning a default string if the locale is not recognized.
 Community getParentCommunity()
          Access the parent community
 Portal getPortal()
          Returns the portal that this gear is associated with.
 GearHeightEnum getPreferredHeight()
          Access the preferred height of the gear
 GearWidthEnum getPreferredWidth()
          Access the preferred width of the gear
 Role getRole(java.lang.String pName)
          Access the Role associated with the supplied name
 java.security.Principal getSecurityPrincipal(java.lang.String pName)
          Access the principal associated with the supplied name
 java.lang.String getServletContext()
          Access the servlet context of the gear
 java.lang.String getSmallImageURL()
          Access a url to the small image for the Gear
 java.lang.String getVersion()
          Access the version of the gear
 boolean hasAccess(AccessRight pRight)
          Returns true if the current user has the specified access to the page.
 boolean hasAccess(BaseEnvironment pEnv)
          Deprecated.  
 boolean hasGearAlertParameter(java.lang.String pParam)
          Returns true if the gear has a named alert parameter
 boolean hasGearInstanceParameter(java.lang.String pParam)
          Returns true if the gear has a named instance parameter
 boolean hasGearUserParameter(java.lang.String pParam)
          Returns true if the gear has a named instance parameter
 boolean hasMode(java.lang.String pGearMode, java.lang.String pDisplayMode)
          True if the Gear has a given gear mode for the given display mode
 boolean hasMode(java.lang.String pGearMode, java.lang.String pDisplayMode, java.lang.String pDeviceOutput)
          True if the Gear has a given gear mode for the given display mode and the given deviceOutput
 boolean hasRole(java.lang.String gearRole)
          Returns true if the user has the indicated gear role.
 boolean isReadOnlyParameter(java.lang.String pParamName)
           
 boolean isShared()
          True if the gear may be shared
 boolean isShowTitleBars()
          True if the gear should display its titlebar
 void setAccessLevel(int pAccessLevel)
          Sets the access level of this gear
 void setDescription(java.lang.String pDescription)
          Deprecated.  
 void setDescription(java.lang.String description, java.util.Locale locale)
          Sets the description of the gear for the given locale.
 void setGearAlertParameter(java.lang.String pParam, java.lang.String pValue)
          Set the gear alert parameter
 void setGearAlertParameterDefaultValue(java.lang.String pParam, java.lang.String pValue)
          Set the default value of the gear instance parameter
 void setGearDefinition(GearDefinition pGearDefinition)
          Sets the gearDefinition of this gear
 void setGearInstanceParameter(java.lang.String pParam, java.lang.String pValue)
          Set the gear instance parameter
 void setGearInstanceParameterDefaultValue(java.lang.String pParam, java.lang.String pValue)
          Set the default value of the gear instance parameter
 void setGearUserParameter(java.lang.String pParam, java.lang.String pValue)
          Set the gear instance parameter
 void setGearUserParameterDefaultValue(java.lang.String pParam, java.lang.String pValue)
          Set the default value of the gear instance parameter
 void setGearUserParameterValues(java.lang.String m_name, java.util.Collection m_values)
           
 void setName(java.lang.String pName)
          Deprecated.  
 void setName(java.lang.String name, java.util.Locale locale)
          Sets the name of the gear for the given locale.
 void setParentCommunity(Community pParentCommunity)
          set the parent community of this gear
 void setShared(boolean pShared)
          Set if the gear should be shared across communities
 void unshare()
          Unshare a shared gear so that its unavailable to all the other communities but its parent community using
 
Methods inherited from interface atg.security.SecuredObject
getAccessControlList, getOwner, getSecurityContext, setAccessControlList, setOwner, supportsAccessControlList, supportsOwner, unsecuredGetAccessControlList, unsecuredGetContainers, unsecuredGetOwner, unsecuredSetAccessControlList, unsecuredSetOwner
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Method Detail

getPortal

Portal getPortal()
Returns the portal that this gear is associated with.


getId

java.lang.String getId()
Access the id of the gear

Returns:
an id

getName

java.lang.String getName()
Deprecated. 

Access the name of the gear

Returns:
a name
See Also:
getName(Locale)

getName

java.lang.String getName(java.util.Locale locale)
Gets the localized name of this gear, returning a default string if the locale is not recognized.


setName

void setName(java.lang.String pName)
Deprecated. 

Sets the name of the gear

See Also:
setName(String, Locale)

setName

void setName(java.lang.String name,
             java.util.Locale locale)
Sets the name of the gear for the given locale.

Parameters:
name -
locale -

getDescription

java.lang.String getDescription()
Deprecated. 

Access a description of the gear

Returns:
a description
See Also:
getDescription(Locale)

getDescription

java.lang.String getDescription(java.util.Locale locale)
Gets the localized description of this gear, returning a default string if the locale is not recognized.


setDescription

void setDescription(java.lang.String pDescription)
Deprecated. 

Sets the description of this gear

See Also:
setDescription(String, Locale)

setDescription

void setDescription(java.lang.String description,
                    java.util.Locale locale)
Sets the description of the gear for the given locale.

Parameters:
description -
locale -

getCreationDate

java.util.Date getCreationDate()
Access the creation date of the gear

Returns:
a date

getLastModified

java.util.Date getLastModified()
Access the last modified date of the gear

Returns:
a date

getAuthor

java.lang.String getAuthor()
Access the author of the gear

Returns:
an author

getVersion

java.lang.String getVersion()
Access the version of the gear

Returns:
a version

isShowTitleBars

boolean isShowTitleBars()
True if the gear should display its titlebar

Returns:
true if the gear should display its titlebar, false otherwise

getServletContext

java.lang.String getServletContext()
Access the servlet context of the gear

Returns:
a servlet context

getSmallImageURL

java.lang.String getSmallImageURL()
Access a url to the small image for the Gear

Returns:
a url

getLargeImageURL

java.lang.String getLargeImageURL()
Access a url to the large image for the Gear

Returns:
a url

getPreferredWidth

GearWidthEnum getPreferredWidth()
Access the preferred width of the gear

Returns:
a width

getPreferredHeight

GearHeightEnum getPreferredHeight()
Access the preferred height of the gear

Returns:
a height

isShared

boolean isShared()
True if the gear may be shared

Returns:
true if the gear may be shared, false otherwise

setShared

void setShared(boolean pShared)
Set if the gear should be shared across communities


hasMode

boolean hasMode(java.lang.String pGearMode,
                java.lang.String pDisplayMode)
True if the Gear has a given gear mode for the given display mode

Parameters:
pGearMode - a gear mode
pDisplayMode - a display mode
Returns:
true if the Gear has a given gear mode for the given display mode, false otherwise

hasMode

boolean hasMode(java.lang.String pGearMode,
                java.lang.String pDisplayMode,
                java.lang.String pDeviceOutput)
True if the Gear has a given gear mode for the given display mode and the given deviceOutput

Parameters:
pGearMode - a gear mode
pDisplayMode - a display mode
pDeviceOutput - a device output
Returns:
true if the Gear has a given gear mode for the given display mode and the given deviceOutput, false otherwise

getParentCommunity

Community getParentCommunity()
Access the parent community

Returns:
the parent community

setParentCommunity

void setParentCommunity(Community pParentCommunity)
set the parent community of this gear


getGearDefinition

GearDefinition getGearDefinition()
Access the gear definition

Returns:
the gear definition
See Also:
GearDefinition

setGearDefinition

void setGearDefinition(GearDefinition pGearDefinition)
Sets the gearDefinition of this gear


hasGearInstanceParameter

boolean hasGearInstanceParameter(java.lang.String pParam)
Returns true if the gear has a named instance parameter

Parameters:
pParam - the name of the parameter
Returns:
true is parameter exists, false otherwise

getGearInstanceParameter

java.lang.String getGearInstanceParameter(java.lang.String pParam)
Access a named gear instance parameter

Parameters:
pParam - the name of the parameter
Returns:
a gear parameter

setGearInstanceParameter

void setGearInstanceParameter(java.lang.String pParam,
                              java.lang.String pValue)
Set the gear instance parameter

Parameters:
pParam - the name of the parameter
pValue - the value

getGearInstanceParameterDefaultValue

java.lang.String getGearInstanceParameterDefaultValue(java.lang.String pParam)
Access the default value of the named gear instance parameter

Parameters:
pName - the parameter name
Returns:
the default value of the parameter, null if it does not exist

setGearInstanceParameterDefaultValue

void setGearInstanceParameterDefaultValue(java.lang.String pParam,
                                          java.lang.String pValue)
Set the default value of the gear instance parameter

Parameters:
pParam - the name of the parameter
pValue - the default value

getGearInstanceParameterNames

java.lang.String[] getGearInstanceParameterNames()
Access the names of the gear instance parameters

Returns:
an array of gear instance parameter names

hasGearUserParameter

boolean hasGearUserParameter(java.lang.String pParam)
Returns true if the gear has a named instance parameter

Parameters:
pParam - the name of the parameter
Returns:
true is parameter exists, false otherwise

getGearUserParameter

java.lang.String getGearUserParameter(java.lang.String pParam)
Access a named gear instance parameter

Parameters:
pParam - the name of the parameter
Returns:
a gear parameter

setGearUserParameter

void setGearUserParameter(java.lang.String pParam,
                          java.lang.String pValue)
Set the gear instance parameter

Parameters:
pParam - the name of the parameter
pValue - the value

setGearUserParameterValues

void setGearUserParameterValues(java.lang.String m_name,
                                java.util.Collection m_values)
Parameters:
m_name -
m_values -

getGearUserParameterDefaultValue

java.lang.String getGearUserParameterDefaultValue(java.lang.String pParam)
Access the default value of the named gear instance parameter

Parameters:
pName - the parameter name
Returns:
the default value of the parameter, null if it does not exist

getGearUserParameterDefaultValues

java.util.List getGearUserParameterDefaultValues(java.lang.String pParam)

setGearUserParameterDefaultValue

void setGearUserParameterDefaultValue(java.lang.String pParam,
                                      java.lang.String pValue)
Set the default value of the gear instance parameter

Parameters:
pParam - the name of the parameter
pValue - the default value

getGearUserParameterNames

java.lang.String[] getGearUserParameterNames()
Access the names of the gear instance parameters

Returns:
an array of gear instance parameter names

hasGearAlertParameter

boolean hasGearAlertParameter(java.lang.String pParam)
Returns true if the gear has a named alert parameter

Parameters:
pParam - the name of the parameter
Returns:
true is parameter exists, false otherwise

getGearAlertParameter

atg.portal.alert.AlertParameter getGearAlertParameter(java.lang.String pParam)
Access a named gear alert parameter

Parameters:
pParam - the name of the parameter
Returns:
a gear parameter

setGearAlertParameter

void setGearAlertParameter(java.lang.String pParam,
                           java.lang.String pValue)
Set the gear alert parameter

Parameters:
pParam - the name of the parameter
pValue - the value

getGearAlertParameterDefaultValue

java.lang.String getGearAlertParameterDefaultValue(java.lang.String pParam)
Access the default value of the named gear alert parameter

Parameters:
pName - the parameter name
Returns:
the default value of the parameter, null if it does not exist

setGearAlertParameterDefaultValue

void setGearAlertParameterDefaultValue(java.lang.String pParam,
                                       java.lang.String pValue)
Set the default value of the gear instance parameter

Parameters:
pParam - the name of the parameter
pValue - the default value

getGearAlertParameterNames

java.lang.String[] getGearAlertParameterNames()
Access the names of the gear instance parameters

Returns:
an array of gear instance parameter names

getAccessLevel

int getAccessLevel()

setAccessLevel

void setAccessLevel(int pAccessLevel)
Sets the access level of this gear


hasAccess

boolean hasAccess(BaseEnvironment pEnv)
Deprecated. 

Returns true if the current environment has access to the gear. This method has been deprecated in favor of the hasAccess(AccessRight) method. This method is equivalent to calling hasAccess(atg.portal.framework.PortalAccessRights.READ).

Parameters:
pEnv - an environment
Returns:
true if the current environment has access to the gear, false otherwise

hasAccess

boolean hasAccess(AccessRight pRight)
                  throws SecurityException
Returns true if the current user has the specified access to the page.

Throws:
SecurityException
See Also:
PortalAccessRights, PortalAccessRights.PAGE_RIGHTS

hasRole

boolean hasRole(java.lang.String gearRole)
Returns true if the user has the indicated gear role.


getRole

Role getRole(java.lang.String pName)
Access the Role associated with the supplied name

Parameters:
pName - a role name
Returns:
a Role

getSecurityPrincipal

java.security.Principal getSecurityPrincipal(java.lang.String pName)
Access the principal associated with the supplied name

Parameters:
pName - a name
Returns:
a principal

unshare

void unshare()
             throws PortalException,
                    SecurityException
Unshare a shared gear so that its unavailable to all the other communities but its parent community using

Throws:
PortalException - if there were any errors unsharing the gear.
SecurityException

getGearUserParameterValues

java.util.List getGearUserParameterValues(java.lang.String prefName)
Parameters:
prefName -
Returns:

isReadOnlyParameter

boolean isReadOnlyParameter(java.lang.String pParamName)