com.cc.framework.ui.model.imp
Class CrumbModelImp

java.lang.Object
  extended bycom.cc.framework.ui.model.imp.ClientHandlerImp
      extended bycom.cc.framework.ui.model.imp.CrumbModelImp
All Implemented Interfaces:
AccessControlled, ClientHandler, CrumbModel, DesignModel, java.io.Serializable

public class CrumbModelImp
extends ClientHandlerImp
implements CrumbModel, java.io.Serializable

Designmodel for the crumbs of a CrumbsControl

Since:
1.3
Version:
$Revision: 1.11 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  java.lang.String action
          The action which should be processed if the crumb is activated.
private  java.lang.String crumbid
          The unique id of the crumb
private  boolean disabled
          This flag indicates if the crumb is disabled
private  java.lang.Boolean filter
          Specifies if all String should be converted into there HTML representation
private  java.lang.String imageRef
          Reference to an image in the ImageMap of the CrumbControl which should be displayed on the crumb in front of the label.
private  java.lang.String localeName
          Locale Setting
private  Permission permission
          The Permission for the crumb
private static long serialVersionUID
          Serial Version UID
private  java.lang.String title
          The title of the crumb
private  java.lang.String tooltip
          A tooltip which is displayed if the user moves the mouse over the label/title.
 
Fields inherited from class com.cc.framework.ui.model.imp.ClientHandlerImp
 
Constructor Summary
CrumbModelImp()
          Constructor for CrumbDesignModelImp
 
Method Summary
 java.lang.Boolean filter()
          Returns if the filter is activated (default=true).
 java.lang.String getAction()
          Returns the action, which should be processed if the Crumb is selected.
 java.lang.String getCrumbId()
          Returns the unique key for the Crumb
 java.lang.String getImageRef()
          Returns the assignment Rule
 java.lang.String getLocaleName()
          Gets the Local Setting for this element
 Permission getPermission()
          Returns the authorizations required to access an object If the method returns null no access rights is required.
 java.lang.String getTitle()
          Returns the Title
 java.lang.String getTooltip()
          Returns the tooltip
 boolean isDisabled()
          Checks if the crumb is disabled
 void setAction(java.lang.String string)
          Sets the Action, which should be processed if the Crumb is selected.
 void setCrumbId(java.lang.String crumbid)
          Sets the Id for the Crumb
 void setDisabled(boolean disabled)
          Marks the crumb as disabled
 void setFilter(boolean filter)
          Activates the HTML encoding (filter).
 void setImageRef(java.lang.String imageRef)
          Assigns the Crumb an Image from an ImageMap
 void setLocaleName(java.lang.String locale)
          Sets the Locale configuration for this element
 void setPermission(Permission permission)
          Sets a list with permission for the object.
 void setTitle(java.lang.String title)
          Sets the Title
 void setTooltip(java.lang.String tooltip)
          Sets the tooltip text
 boolean show(Principal principal)
          Checks if the Object has a required permission.
 
Methods inherited from class com.cc.framework.ui.model.imp.ClientHandlerImp
evaluate, getHandler, getHandlers, setHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cc.framework.ui.model.ClientHandler
getHandler, getHandlers, setHandler
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

crumbid

private java.lang.String crumbid
The unique id of the crumb


action

private java.lang.String action
The action which should be processed if the crumb is activated.


title

private java.lang.String title
The title of the crumb


tooltip

private java.lang.String tooltip
A tooltip which is displayed if the user moves the mouse over the label/title.


imageRef

private java.lang.String imageRef
Reference to an image in the ImageMap of the CrumbControl which should be displayed on the crumb in front of the label.


disabled

private boolean disabled
This flag indicates if the crumb is disabled


filter

private java.lang.Boolean filter
Specifies if all String should be converted into there HTML representation


localeName

private java.lang.String localeName
Locale Setting


permission

private Permission permission
The Permission for the crumb

Constructor Detail

CrumbModelImp

public CrumbModelImp()
Constructor for CrumbDesignModelImp

Method Detail

getTitle

public java.lang.String getTitle()
Description copied from interface: CrumbModel
Returns the Title

Specified by:
getTitle in interface CrumbModel
Returns:
The Title
See Also:
CrumbModel.getTitle()

setTitle

public void setTitle(java.lang.String title)
Description copied from interface: CrumbModel
Sets the Title

Specified by:
setTitle in interface CrumbModel
Parameters:
title - The Title
See Also:
CrumbModel.setTitle(java.lang.String)

setTooltip

public void setTooltip(java.lang.String tooltip)
Description copied from interface: CrumbModel
Sets the tooltip text

Specified by:
setTooltip in interface CrumbModel
Parameters:
tooltip - The Tooltip
See Also:
CrumbModel.setTooltip(java.lang.String)

getTooltip

public java.lang.String getTooltip()
Description copied from interface: CrumbModel
Returns the tooltip

Specified by:
getTooltip in interface CrumbModel
Returns:
The tooltip
See Also:
CrumbModel.getTooltip()

getCrumbId

public java.lang.String getCrumbId()
Description copied from interface: CrumbModel
Returns the unique key for the Crumb

Specified by:
getCrumbId in interface CrumbModel
Returns:
The id of the crumb
See Also:
CrumbModel.getCrumbId()

setCrumbId

public void setCrumbId(java.lang.String crumbid)
Description copied from interface: CrumbModel
Sets the Id for the Crumb

Specified by:
setCrumbId in interface CrumbModel
Parameters:
crumbid - Unique Id
See Also:
CrumbModel.setCrumbId(java.lang.String)

getImageRef

public java.lang.String getImageRef()
Description copied from interface: CrumbModel
Returns the assignment Rule

Specified by:
getImageRef in interface CrumbModel
Returns:
String
See Also:
CrumbModel.getImageRef()

setImageRef

public void setImageRef(java.lang.String imageRef)
Description copied from interface: CrumbModel
Assigns the Crumb an Image from an ImageMap

Specified by:
setImageRef in interface CrumbModel
Parameters:
imageRef - Rule of the ImageMap to match
See Also:
CrumbModel.setImageRef(java.lang.String)

isDisabled

public boolean isDisabled()
Description copied from interface: CrumbModel
Checks if the crumb is disabled

Specified by:
isDisabled in interface CrumbModel
Returns:
returns true if the crumb is disabled
See Also:
CrumbModel.isDisabled()

setDisabled

public void setDisabled(boolean disabled)
Description copied from interface: CrumbModel
Marks the crumb as disabled

Specified by:
setDisabled in interface CrumbModel
Parameters:
disabled - true to disable the crumb
See Also:
CrumbModel.setDisabled(boolean)

getAction

public java.lang.String getAction()
Description copied from interface: CrumbModel
Returns the action, which should be processed if the Crumb is selected.

Specified by:
getAction in interface CrumbModel
Returns:
String
See Also:
CrumbModel.getAction()

setAction

public void setAction(java.lang.String string)
Description copied from interface: CrumbModel
Sets the Action, which should be processed if the Crumb is selected.

Specified by:
setAction in interface CrumbModel
Parameters:
string - Action
See Also:
CrumbModel.setAction(java.lang.String)

filter

public java.lang.Boolean filter()
Description copied from interface: CrumbModel
Returns if the filter is activated (default=true). This means that all Strings which should be displayed in the HTML page are HTML encoded

Specified by:
filter in interface CrumbModel
Returns:
true if string will be HTML encoded; false otherwise. If a null is returned than the filter of the enclosing CrumbControl should be used
See Also:
CrumbModel.filter()

setFilter

public void setFilter(boolean filter)
Description copied from interface: CrumbModel
Activates the HTML encoding (filter). Default is true. This means that all Strings which should be displayed in the HTML page will be HTML encoded.

Specified by:
setFilter in interface CrumbModel
Parameters:
filter - true if strings should be HTML encoded; false otherwise
See Also:
CrumbModel.setFilter(boolean)

getLocaleName

public java.lang.String getLocaleName()
Description copied from interface: CrumbModel
Gets the Local Setting for this element

Specified by:
getLocaleName in interface CrumbModel
Returns:
Locale Setting
See Also:
CrumbModel.getLocaleName()

setLocaleName

public void setLocaleName(java.lang.String locale)
Description copied from interface: CrumbModel
Sets the Locale configuration for this element

Specified by:
setLocaleName in interface CrumbModel
Parameters:
locale - Locale Identifier or true|false
See Also:
CrumbModel.setLocaleName(java.lang.String)

getPermission

public Permission getPermission()
Description copied from interface: AccessControlled
Returns the authorizations required to access an object If the method returns null no access rights is required.

Specified by:
getPermission in interface AccessControlled
Returns:
Permission A list with required permissions separated by ";"
See Also:
AccessControlled.getPermission()

setPermission

public void setPermission(Permission permission)
Description copied from interface: CrumbModel
Sets a list with permission for the object. Permissions are separated by ';'

Specified by:
setPermission in interface CrumbModel
Parameters:
permission - Permission
See Also:
CrumbModel.setPermission(com.cc.framework.security.Permission)

show

public boolean show(Principal principal)
Description copied from interface: AccessControlled
Checks if the Object has a required permission.

Specified by:
show in interface AccessControlled
Parameters:
principal - the users principal object
Returns:
true if the permission exists
See Also:
AccessControlled.show(com.cc.framework.security.Principal)


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.