com.sapportals.wcm.control.edit

Class ResourceCustomPropertyControl2

java.lang.Object
  extended by com.sapportals.wdf.stack.Control
      extended by com.sapportals.wcm.control.base.WcmBaseControl
          extended by com.sapportals.wcm.control.base.WcmResourceControl
              extended by com.sapportals.wcm.control.edit.ResourceCustomPropertyControl2
All Implemented Interfaces:
com.sapportals.wdf.event.WdfEventReceiver

public class ResourceCustomPropertyControl2
extends WcmResourceControl
implements com.sapportals.wdf.event.WdfEventReceiver

User interface for creation and modification of custom properties.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sapportals.wcm.control.base.WcmResourceControl
WcmResourceControl.ResourceNotFoundException
 
Field Summary
 
Fields inherited from class com.sapportals.wcm.control.base.WcmResourceControl
START_PAGE_BROWSE, START_PAGE_DETAILS, uri
 
Fields inherited from class com.sapportals.wcm.control.base.WcmBaseControl
BLANK_LINK_TARGET, CELL_PADDING_STANDARD, CELL_SPACING_STANDARD, CONTROL_HEADER_STANDARD, DETAILS_CONFIG_FILE, NONE, RES_BUTTON_ADD, RES_BUTTON_APPLY, RES_BUTTON_BACK, RES_BUTTON_CANCEL, RES_BUTTON_CLOSE, RES_BUTTON_LOAD, RES_BUTTON_MORE, RES_BUTTON_OK, RES_BUTTON_REMOVE, RES_BUTTON_SAVE, RES_BUTTON_SELECT, RES_BUTTON_UPDATE, resourceContext, SUMMARY
 
Fields inherited from class com.sapportals.wdf.stack.Control
id
 
Constructor Summary
ResourceCustomPropertyControl2()
           
 
Method Summary
protected  boolean canModify(IProperty property)
           
 boolean canSave()
          Workaround for composite control usage.
 String getHidden()
           
 boolean getHideTitle()
           
 Macro getMacroCommand()
           
 String getMaintainable()
           
 String getNewPropertyName()
           
 String getNewPropertyValue()
           
 boolean getNewResourceFlag()
           
 String getProperties()
           
 boolean getShowSaveButton()
          Get the ShowSaveButton attribute of the ResourceCustomPropertyControl2 object.
 boolean getUiDetailsHeader()
           
 boolean getUpdateWithoutLocking()
           
 String getUrlProperties()
           
protected  void initialize()
          Initialize control.
 com.sapportals.wdf.event.WdfEvent onAddNewProperty(com.sapportals.htmlb.event.Event event)
          Adds an empty property.
 com.sapportals.wdf.event.WdfEvent onDeleteSelectedProperties(com.sapportals.htmlb.event.Event event)
          Deletes selected properties from list.
 com.sapportals.wdf.event.WdfEvent onSaveAllChanges(com.sapportals.htmlb.event.Event event)
          Save all changes to resource.
protected  void readInputData()
          Reads data from dynPage.
 void receive(com.sapportals.wdf.event.WdfEvent wdfEvent)
          reacts on CflResourceEvents and resets the present resource of the control.
 com.sapportals.htmlb.Component render()
          Renders control.
 com.sapportals.htmlb.Component renderPersistentProperties()
          Renders local properties map as hidden InputField.
 void restorePersistentProperties(com.sapportals.htmlb.page.DynPage page)
          Restores local properties map as hidden InputField.
 LinkedList retrieveAllCustomProperties()
          Retrieve all custom properties which were created for the resource Used when the control is used for creating a new resource
 void setEmptyCustomProperties()
          Set to empty the list of custom properties Used when the control is used for creating a new resource
 void setHidden(String properties)
           
 void setHideTitle(boolean hideTitle)
           
 void setMaintainable(String properties)
           
 void setNewPropertyName(String newPropertyName)
           
 void setNewPropertyValue(String newPropertyValue)
           
 void setNewResourceFlag(boolean flag)
           
 void setProperties(String properties)
           
 void setShowSaveButton(boolean showSaveButton)
          Set the ShowSaveButton attribute of the ResourceCustomPropertyControl2 object.
 void setUiDetailsHeader(boolean uiDetails)
           
 void setUpdateWithoutLocking(boolean properties)
           
 void setUrlProperties(String properties)
           
 
Methods inherited from class com.sapportals.wcm.control.base.WcmResourceControl
checkArchivingStauts, getAOStates, getDetailsPageUri, getResource, getResourceLink, getResourceList, getSafeResource, getUri, setResource, setUri
 
Methods inherited from class com.sapportals.wcm.control.base.WcmBaseControl
getBaseBundleString, getBaseBundleString, getBaseBundleString, getBaseBundleString, getBundleString, getBundleString, getBundleString, getBundleString, getBusinessCardLink, getImage, getParameterConfiguration, getResourceContext, getServicePageUri, handleException, isSection508Rendering, isTestMode, isVisible, setControlContext, setResourceContext, setTestMode, setVisible
 
Methods inherited from class com.sapportals.wdf.stack.Control
create, create, createNestedControls, createUnequivocallyComponentId, dispatchHtmlbEvent, dispatchWdfEvent, getControlContext, getDynPage, getID, getParent, getPersistenceComponentManager, getRootControl, getStackId, initializeImpl, isInitialized, register, resetNestedControls, restoreProperties, setID, setInitialized, setParent, setStackId, triggerInput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceCustomPropertyControl2

public ResourceCustomPropertyControl2()
Method Detail

setShowSaveButton

public void setShowSaveButton(boolean showSaveButton)
Set the ShowSaveButton attribute of the ResourceCustomPropertyControl2 object.

Parameters:
showSaveButton - The new ShowSaveButton value

getShowSaveButton

public boolean getShowSaveButton()
Get the ShowSaveButton attribute of the ResourceCustomPropertyControl2 object.

Returns:
The ShowSaveButton value

setUiDetailsHeader

public void setUiDetailsHeader(boolean uiDetails)

getUiDetailsHeader

public boolean getUiDetailsHeader()

setNewResourceFlag

public void setNewResourceFlag(boolean flag)

getNewResourceFlag

public boolean getNewResourceFlag()

setHideTitle

public void setHideTitle(boolean hideTitle)

getHideTitle

public boolean getHideTitle()

setUrlProperties

public void setUrlProperties(String properties)

getUrlProperties

public String getUrlProperties()

setProperties

public void setProperties(String properties)

getProperties

public String getProperties()

setMaintainable

public void setMaintainable(String properties)

getMaintainable

public String getMaintainable()

setHidden

public void setHidden(String properties)

getHidden

public String getHidden()

setUpdateWithoutLocking

public void setUpdateWithoutLocking(boolean properties)

getUpdateWithoutLocking

public boolean getUpdateWithoutLocking()

onAddNewProperty

public com.sapportals.wdf.event.WdfEvent onAddNewProperty(com.sapportals.htmlb.event.Event event)
                                                   throws WcmResourceControl.ResourceNotFoundException,
                                                          WcmException
Adds an empty property.

Parameters:
event - A htmlb event.
Returns:
A ScreenFlow event.
Throws:
ResourceNotFoundException - Exception raised in failure situation
WcmException - Exception raised in failure situation
com.sapportals.wdf.WdfException - An error happens.
WcmResourceControl.ResourceNotFoundException

receive

public void receive(com.sapportals.wdf.event.WdfEvent wdfEvent)
             throws com.sapportals.wdf.WdfException
Description copied from class: WcmResourceControl
reacts on CflResourceEvents and resets the present resource of the control. If controls want to implement a special treatment of these events they can implement this method themselves.

Specified by:
receive in interface com.sapportals.wdf.event.WdfEventReceiver
Overrides:
receive in class WcmResourceControl
Throws:
com.sapportals.wdf.WdfException

restorePersistentProperties

public void restorePersistentProperties(com.sapportals.htmlb.page.DynPage page)
                                 throws com.sapportals.wdf.WdfException
Restores local properties map as hidden InputField.

Overrides:
restorePersistentProperties in class com.sapportals.wdf.stack.Control
Parameters:
page - The DynPage to read out components
Throws:
com.sapportals.wdf.WdfException

renderPersistentProperties

public com.sapportals.htmlb.Component renderPersistentProperties()
                                                          throws com.sapportals.wdf.WdfException
Renders local properties map as hidden InputField.

Overrides:
renderPersistentProperties in class com.sapportals.wdf.stack.Control
Returns:
A sub control tree containing hidden fields.
Throws:
com.sapportals.wdf.WdfException

canSave

public boolean canSave()
                throws com.sapportals.wdf.WdfException
Workaround for composite control usage.

Returns:
a command state
Throws:
com.sapportals.wdf.WdfException - Exception raised in failure situation

initialize

protected void initialize()
                   throws com.sapportals.wdf.WdfException
Initialize control.

Overrides:
initialize in class com.sapportals.wdf.stack.Control
Throws:
com.sapportals.wdf.WdfException

render

public com.sapportals.htmlb.Component render()
                                      throws com.sapportals.wdf.WdfException
Renders control.

Specified by:
render in class com.sapportals.wdf.stack.Control
Returns:
A sub component tree.
Throws:
com.sapportals.wdf.WdfException - An error happens.

getNewPropertyName

public String getNewPropertyName()

setNewPropertyName

public void setNewPropertyName(String newPropertyName)

getNewPropertyValue

public String getNewPropertyValue()

setNewPropertyValue

public void setNewPropertyValue(String newPropertyValue)

readInputData

protected void readInputData()
                      throws com.sapportals.wdf.WdfException
Reads data from dynPage.

Overrides:
readInputData in class WcmBaseControl
Throws:
com.sapportals.wdf.WdfException

onDeleteSelectedProperties

public com.sapportals.wdf.event.WdfEvent onDeleteSelectedProperties(com.sapportals.htmlb.event.Event event)
                                                             throws com.sapportals.wdf.WdfException
Deletes selected properties from list.

Parameters:
event - HTMLB event
Returns:
WDF screen flow event
Throws:
com.sapportals.wdf.WdfException - Exception raised in failure situation

onSaveAllChanges

public com.sapportals.wdf.event.WdfEvent onSaveAllChanges(com.sapportals.htmlb.event.Event event)
                                                   throws com.sapportals.wdf.WdfException
Save all changes to resource.

Parameters:
event - A htmlb event.
Returns:
A ScreenFlow event.
Throws:
com.sapportals.wdf.WdfException - An error happens.

getMacroCommand

public Macro getMacroCommand()
                      throws com.sapportals.wdf.WdfException
Throws:
com.sapportals.wdf.WdfException

canModify

protected boolean canModify(IProperty property)
                     throws WcmException
Throws:
WcmException

retrieveAllCustomProperties

public LinkedList retrieveAllCustomProperties()
Retrieve all custom properties which were created for the resource Used when the control is used for creating a new resource

Returns:
Description of the Return Value

setEmptyCustomProperties

public void setEmptyCustomProperties()
Set to empty the list of custom properties Used when the control is used for creating a new resource

Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/nonwduideprecated api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice