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

java.lang.Object
  extended bycom.cc.framework.ui.model.imp.ClientHandlerImp
      extended bycom.cc.framework.ui.model.imp.ControlDesignModelImp
          extended bycom.cc.framework.ui.model.imp.MessageDesignModelImp
All Implemented Interfaces:
AccessControlled, ActionBehavior, AjaxSupport, ButtonContainer, ClientHandler, ControlDesignModel, DesignModel, FrameContainer, MessageDesignModel, java.io.Serializable

public class MessageDesignModelImp
extends ControlDesignModelImp
implements MessageDesignModel

Designmodel for messages

Since:
1.0
Version:
$Revision: 1.17 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  ButtonContainer buttons
          The users permission which is necessary to see any buttons
private  java.lang.String caption
          The caption
private  java.lang.String detail
          The message text
private  boolean filter
          Specifies if all String should be converted into there HTML representation
private  java.lang.String formId
          Form iD
private  java.util.ArrayList frames
          Container with the form elements
private  ImageModel image
          The optional title image
private static long serialVersionUID
          Serial Version UID
private  Severity severity
          The severity of the message
 
Fields inherited from class com.cc.framework.ui.model.imp.ControlDesignModelImp
 
Fields inherited from class com.cc.framework.ui.model.imp.ClientHandlerImp
 
Constructor Summary
MessageDesignModelImp()
          Constructor for MessageDesignModelImp
 
Method Summary
 void addInnerFrame(InnerFrame frame)
          Adds a inner frame to the List
 boolean filter()
          Returns if the filter is activated (default=true).
 Permission getButtonPermission(ControlButton button)
          Retrieves the permission for the given button
 java.lang.String getCaption()
          Returns the Caption
 java.lang.String getDetail()
          Returns the Detail String
 java.lang.String getFormId()
          Returns the Form Id
 ImageModel getImage()
          Returns the image for the frames title
 InnerFrame[] getInnerFrames(Principal principal, java.lang.Object layoutHint)
          Retrieves a list of only the inner frames that are matching the given layout hint
 Severity getSeverity()
          Returns the Severity of the Message
 void setButtonPermission(ControlButton button, Permission permission)
          Sets whether a command button should be displayed by specifying an Access Control List.
 void setCaption(java.lang.String caption)
          Sets the Caption
 void setDetail(java.lang.String detail)
          Sets the Details
 void setFilter(boolean filter)
          Activates the HTML encoding (filter).
 void setFormId(java.lang.String formId)
          Sets the Form Id
 void setImage(ImageModel img)
          Sets an image for the frames title
 void setSeverity(Severity severity)
          sets the Severity
 boolean showButton(ControlButton button, Principal principal)
          Checks if the button can be displayed.
 
Methods inherited from class com.cc.framework.ui.model.imp.ControlDesignModelImp
addDesignRule, enableAjax, getAction, getBorder, getDesignRules, getHeight, getHelp, getId, getLocaleName, getName, getPermission, getProperty, getRunAt, getStyle, getStyleClass, getStyleId, getSummary, getTabIndex, getTooltip, getTransaction, getWidth, hasShadow, isAjaxEnabled, isDisabled, isDynamicDesignModel, isFormElement, setAction, setBorder, setDisabled, setDynamicDesignModel, setFormElement, setHeight, setHelp, setId, setLocaleName, setName, setPermission, setProperty, setRunAt, setShadow, setStyle, setStyleClass, setStyleId, setSummary, setTabIndex, setTooltip, setTransaction, setWidth, show
 
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.ControlDesignModel
addDesignRule, getAction, getBorder, getDesignRules, getHeight, getHelp, getId, getLocaleName, getName, getProperty, getRunAt, getStyle, getStyleClass, getStyleId, getSummary, getTabIndex, getTooltip, getTransaction, getWidth, hasShadow, isDisabled, isDynamicDesignModel, isFormElement, setAction, setBorder, setDisabled, setDynamicDesignModel, setFormElement, setHeight, setHelp, setId, setLocaleName, setName, setPermission, setProperty, setRunAt, setShadow, setStyle, setStyleClass, setStyleId, setSummary, setTabIndex, setTooltip, setTransaction, setWidth
 
Methods inherited from interface com.cc.framework.ui.model.ClientHandler
getHandler, getHandlers, setHandler
 
Methods inherited from interface com.cc.framework.ui.model.AccessControlled
getPermission, show
 
Methods inherited from interface com.cc.framework.ui.model.ActionBehavior
isAjaxEnabled
 
Methods inherited from interface com.cc.framework.ui.model.AjaxSupport
enableAjax, isAjaxEnabled
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

severity

private Severity severity
The severity of the message


caption

private java.lang.String caption
The caption


detail

private java.lang.String detail
The message text


formId

private java.lang.String formId
Form iD


filter

private boolean filter
Specifies if all String should be converted into there HTML representation


image

private ImageModel image
The optional title image


buttons

private ButtonContainer buttons
The users permission which is necessary to see any buttons


frames

private java.util.ArrayList frames
Container with the form elements

Constructor Detail

MessageDesignModelImp

public MessageDesignModelImp()
Constructor for MessageDesignModelImp

Method Detail

getSeverity

public Severity getSeverity()
Description copied from interface: MessageDesignModel
Returns the Severity of the Message

Specified by:
getSeverity in interface MessageDesignModel
Returns:
Severity
See Also:
MessageDesignModel.getSeverity()

setSeverity

public void setSeverity(Severity severity)
Description copied from interface: MessageDesignModel
sets the Severity

Specified by:
setSeverity in interface MessageDesignModel
Parameters:
severity - Severity
See Also:
MessageDesignModel.setSeverity(com.cc.framework.common.Severity)

getCaption

public java.lang.String getCaption()
Description copied from interface: MessageDesignModel
Returns the Caption

Specified by:
getCaption in interface MessageDesignModel
Returns:
String
See Also:
MessageDesignModel.getCaption()

getDetail

public java.lang.String getDetail()
Description copied from interface: MessageDesignModel
Returns the Detail String

Specified by:
getDetail in interface MessageDesignModel
Returns:
String
See Also:
MessageDesignModel.getDetail()

setCaption

public void setCaption(java.lang.String caption)
Description copied from interface: MessageDesignModel
Sets the Caption

Specified by:
setCaption in interface MessageDesignModel
Parameters:
caption - Caption
See Also:
MessageDesignModel.setCaption(java.lang.String)

setDetail

public void setDetail(java.lang.String detail)
Description copied from interface: MessageDesignModel
Sets the Details

Specified by:
setDetail in interface MessageDesignModel
Parameters:
detail - Details
See Also:
MessageDesignModel.setDetail(java.lang.String)

getFormId

public java.lang.String getFormId()
Description copied from interface: MessageDesignModel
Returns the Form Id

Specified by:
getFormId in interface MessageDesignModel
Returns:
String
See Also:
MessageDesignModel.getFormId()

setFormId

public void setFormId(java.lang.String formId)
Description copied from interface: MessageDesignModel
Sets the Form Id

Specified by:
setFormId in interface MessageDesignModel
Parameters:
formId - Form Id
See Also:
MessageDesignModel.setFormId(java.lang.String)

filter

public boolean filter()
Description copied from interface: MessageDesignModel
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 MessageDesignModel
Returns:
true if string will be HTML encoded; false otherwise
See Also:
MessageDesignModel.filter()

setFilter

public void setFilter(boolean filter)
Description copied from interface: MessageDesignModel
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 MessageDesignModel
Parameters:
filter - true if strings should be HTML encoded; false otherwise
See Also:
MessageDesignModel.setFilter(boolean)

addInnerFrame

public void addInnerFrame(InnerFrame frame)
Description copied from interface: FrameContainer
Adds a inner frame to the List

Specified by:
addInnerFrame in interface FrameContainer
Parameters:
frame - the inner frame to add
See Also:
FrameContainer.addInnerFrame(com.cc.framework.ui.model.InnerFrame)

getInnerFrames

public InnerFrame[] getInnerFrames(Principal principal,
                                   java.lang.Object layoutHint)
Description copied from interface: FrameContainer
Retrieves a list of only the inner frames that are matching the given layout hint

Specified by:
getInnerFrames in interface FrameContainer
Parameters:
principal - The principal object for permission tests. This parameter can be null
layoutHint - The layout hint that specifies what frames should be selected: AlignmentType.TOP - header frames AlignmentType.BOTTOM - footer frames
Returns:
Frame list
See Also:
FrameContainer.getInnerFrames(com.cc.framework.security.Principal, java.lang.Object)

getImage

public ImageModel getImage()
Description copied from interface: FrameContainer
Returns the image for the frames title

Specified by:
getImage in interface FrameContainer
Returns:
ImageModel
See Also:
FrameContainer.getImage()

setImage

public void setImage(ImageModel img)
Description copied from interface: FrameContainer
Sets an image for the frames title

Specified by:
setImage in interface FrameContainer
Parameters:
img - ImageModel
See Also:
FrameContainer.setImage(com.cc.framework.ui.model.ImageModel)

getButtonPermission

public Permission getButtonPermission(ControlButton button)
Description copied from interface: ButtonContainer
Retrieves the permission for the given button

Specified by:
getButtonPermission in interface ButtonContainer
Parameters:
button - Button constant
Returns:
Permission or null
See Also:
ButtonContainer.getButtonPermission(com.cc.framework.ui.control.ControlButton)

showButton

public boolean showButton(ControlButton button,
                          Principal principal)
Description copied from interface: ButtonContainer
Checks if the button can be displayed.

Specified by:
showButton in interface ButtonContainer
Parameters:
button - The Button to query
principal - The principal object
Returns:
boolean true if the button should be displayed
See Also:
ButtonContainer.showButton(com.cc.framework.ui.control.ControlButton, com.cc.framework.security.Principal)

setButtonPermission

public void setButtonPermission(ControlButton button,
                                Permission permission)
Description copied from interface: ButtonContainer
Sets whether a command button should be displayed by specifying an Access Control List.

Specified by:
setButtonPermission in interface ButtonContainer
Parameters:
button - The Button to query
permission - Permission
See Also:
ButtonContainer.setButtonPermission(com.cc.framework.ui.control.ControlButton, com.cc.framework.security.Permission)


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