com.sapportals.wcm.control.edit

Class ResourceUploadControl

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.ResourceUploadControl
All Implemented Interfaces:
com.sapportals.wdf.event.WdfEventReceiver

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

Copyright 2004 SAP AG

Created November 1, 2002


Nested Class Summary
protected  class ResourceUploadControl.UploadStatus
           
 
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_REMOVE, RES_BUTTON_SAVE, RES_BUTTON_SELECT, RES_BUTTON_UPDATE, resourceContext, SUMMARY
 
Fields inherited from class com.sapportals.wdf.stack.Control
id
 
Constructor Summary
ResourceUploadControl()
          Constructor
ResourceUploadControl(String controlID)
          Constructor
 
Method Summary
 boolean checkExistingName(String theName)
          Check if already the input name exists as Resource name
protected  void createNestedControls()
          Register composite parts
 boolean getAdvanced()
           
 boolean getAllProperties()
           
 boolean getDisplayHeader()
          Gets the displayHeader attribute of the ResourceUploadControl object
 String getFileContentType()
           
 String getFileExtension()
          Gets the fileExtension attribute of the ResourceUploadControl object
 boolean getFurtherUploadsFlag()
          Gets the furtherUploadsFlag attribute of the ResourceUploadControl object
 boolean getKeepProperties()
           
 String getLastRid()
           
 boolean getNameInvalidFlag()
          Gets the nameInvalidFlag attribute of the ResourceUploadControl object
 boolean getNewResourceFlag()
          Gets the newResourceFlag attribute of the ResourceUploadControl object
 String getPreviousName()
          Gets the previousName attribute of the ResourceUploadControl object
 String getProperties()
           
 boolean getRenameResource()
          Gets the renameResource attribute of the ResourceUploadControl object
 String getResourceType()
           
 boolean getSendBackEvent()
          Gets the sendBackEvent attribute of the ResourceUploadControl object
 String getServerFilePath()
          Gets the serverFilePath attribute of the ResourceUploadControl object
 boolean getShowKeepProperties()
           
 String getStartUri()
          Retrieve the startURI
 String getTargetFolder()
          Gets the targetFolder attribute of the ResourceUploadControl object
 boolean getUiDetailsHeader()
          Gets the uiDetailsHeader attribute of the ResourceUploadControl object
 String getUniqueName()
          Gets the uniqueName attribute of the ResourceUploadControl object
 String getUploadedFilePath()
           
 String getUploadStatus()
           
 boolean getVersionFlag()
          Gets the versionFlag attribute of the ResourceUploadControl object
 com.sapportals.htmlb.Component inputNewName(com.sapportals.htmlb.GridLayout inputGrid, int row)
          Create a Component which contains a Label and a for InputText for the new name of the file
 boolean isStandalone()
           
 boolean isToolbarStyle()
           
 com.sapportals.wdf.event.WdfEvent onCancel(com.sapportals.htmlb.event.Event event)
           
 com.sapportals.wdf.event.WdfEvent onDone(com.sapportals.htmlb.event.Event event)
          Description of the Method
 com.sapportals.wdf.event.WdfEvent onNo(com.sapportals.htmlb.event.Event event)
           
 com.sapportals.wdf.event.WdfEvent onOk(com.sapportals.htmlb.event.Event event)
           
 com.sapportals.wdf.event.WdfEvent onUpload(com.sapportals.htmlb.event.Event event)
           
 com.sapportals.wdf.event.WdfEvent onYes(com.sapportals.htmlb.event.Event event)
           
 com.sapportals.htmlb.RadioButtonGroup overwriteExistingName(boolean versionEnabled)
          Creates a radiobutton group for setting the next actions ( overwrite, save with another name...) regarding uploading an existing resource.
protected  void readInputData()
           
 void receive(com.sapportals.wdf.event.WdfEvent cflEvent)
          reacts on CflResourceEvents and resets the present resource of the control.
 com.sapportals.htmlb.Component render()
          Build the UI for this control
 com.sapportals.htmlb.Component renderKeepProperties(boolean versionEnabled)
          Renders the checkbox for keeping the properties from previous file uploaded
 void setAdvanced(boolean flag)
           
 void setAllProperties(boolean flag)
           
 void setDisplayHeader(boolean newIsViewValue)
          Sets the displayHeader attribute of the ResourceUploadControl object
 void setFileContentType(String newFileContentType)
           
 void setFileExtension(String newExtension)
          Sets the fileExtension attribute of the ResourceUploadControl object
 void setFurtherUploadsFlag(boolean newFlagValue)
          Sets the furtherUploadsFlag attribute of the ResourceUploadControl object
 void setKeepProperties(boolean flag)
           
 void setLastRid(String startUri)
          Set the startURI with a new value
 void setNameInvalidFlag(boolean flag)
          Sets the nameInvalidFlag attribute of the ResourceUploadControl object
 void setNewResourceFlag(boolean flag)
          Sets the newResourceFlag attribute of the ResourceUploadControl object
 void setPreviousName(String newName)
          Sets the previousName attribute of the ResourceUploadControl object
 void setProperties(String properties)
           
 void setRenameResource(boolean flag)
          Sets the renameResource attribute of the ResourceUploadControl object
 void setResourceType(String newResourceTypes)
           
 void setSendBackEvent(boolean flag)
          Sets the sendBackEvent attribute of the ResourceUploadControl object
 void setServerFilePath(String newServerFilePath)
          Sets the serverFilePath attribute of the ResourceUploadControl object
 void setShowKeepProperties(boolean flag)
           
 void setStandalone(boolean isStandalone)
           
 void setStartUri(String startUri)
          Set the startURI with a new value
 void setTargetFolder(String newPath)
          Sets the targetFolder attribute of the ResourceUploadControl object
 void setToolbarStyle(boolean flag)
           
 void setUiDetailsHeader(boolean uiDetails)
          Sets the uiDetailsHeader attribute of the ResourceUploadControl object
 void setUniqueName(String newName)
          Sets the uniqueName attribute of the ResourceUploadControl object
 void setUploadedFilePath(String newFilePath)
           
 void setUploadStatus(String newStatus)
           
 void setVersionFlag(boolean newFlag)
          Sets the versionFlag attribute of the ResourceUploadControl object
 
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, createUnequivocallyComponentId, dispatchHtmlbEvent, dispatchWdfEvent, getControlContext, getDynPage, getID, getParent, getPersistenceComponentManager, getRootControl, getStackId, initialize, initializeImpl, isInitialized, register, renderPersistentProperties, resetNestedControls, restorePersistentProperties, 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

ResourceUploadControl

public ResourceUploadControl()
Constructor


ResourceUploadControl

public ResourceUploadControl(String controlID)
Constructor

Parameters:
controlID -
Method Detail

setStandalone

public void setStandalone(boolean isStandalone)
Parameters:
isStandalone -

isStandalone

public boolean isStandalone()
Returns:
true if it is standl alone, false otherwise.

setAdvanced

public void setAdvanced(boolean flag)
Parameters:
flag -

getAdvanced

public boolean getAdvanced()

setAllProperties

public void setAllProperties(boolean flag)

getAllProperties

public boolean getAllProperties()

setKeepProperties

public void setKeepProperties(boolean flag)

getKeepProperties

public boolean getKeepProperties()

setShowKeepProperties

public void setShowKeepProperties(boolean flag)

getShowKeepProperties

public boolean getShowKeepProperties()

setToolbarStyle

public void setToolbarStyle(boolean flag)

isToolbarStyle

public boolean isToolbarStyle()

setNameInvalidFlag

public void setNameInvalidFlag(boolean flag)
Sets the nameInvalidFlag attribute of the ResourceUploadControl object

Parameters:
flag - The new nameInvalidFlag value

getNameInvalidFlag

public boolean getNameInvalidFlag()
Gets the nameInvalidFlag attribute of the ResourceUploadControl object

Returns:
The nameInvalidFlag value

setSendBackEvent

public void setSendBackEvent(boolean flag)
Sets the sendBackEvent attribute of the ResourceUploadControl object

Parameters:
flag - The new sendBackEvent value

getSendBackEvent

public boolean getSendBackEvent()
Gets the sendBackEvent attribute of the ResourceUploadControl object

Returns:
The sendBackEvent value

setUiDetailsHeader

public void setUiDetailsHeader(boolean uiDetails)
Sets the uiDetailsHeader attribute of the ResourceUploadControl object

Parameters:
uiDetails - The new uiDetailsHeader value

getUiDetailsHeader

public boolean getUiDetailsHeader()
Gets the uiDetailsHeader attribute of the ResourceUploadControl object

Returns:
The uiDetailsHeader value

getStartUri

public String getStartUri()
Retrieve the startURI

Returns:
- the value of startUri as String

setStartUri

public void setStartUri(String startUri)
Set the startURI with a new value

Parameters:
startUri - - new vakue of the startUri

getLastRid

public String getLastRid()

setLastRid

public void setLastRid(String startUri)
Set the startURI with a new value

Parameters:
startUri - - new vakue of the startUri

getUploadStatus

public String getUploadStatus()

setUploadStatus

public void setUploadStatus(String newStatus)

getUniqueName

public String getUniqueName()
Gets the uniqueName attribute of the ResourceUploadControl object

Returns:
The uniqueName value

setUniqueName

public void setUniqueName(String newName)
Sets the uniqueName attribute of the ResourceUploadControl object

Parameters:
newName - The new uniqueName value

getPreviousName

public String getPreviousName()
Gets the previousName attribute of the ResourceUploadControl object

Returns:
The previousName value

setPreviousName

public void setPreviousName(String newName)
Sets the previousName attribute of the ResourceUploadControl object

Parameters:
newName - The new previousName value

getVersionFlag

public boolean getVersionFlag()
Gets the versionFlag attribute of the ResourceUploadControl object

Returns:
The versionFlag value

setVersionFlag

public void setVersionFlag(boolean newFlag)
Sets the versionFlag attribute of the ResourceUploadControl object

Parameters:
newFlag - The new versionFlag value

getUploadedFilePath

public String getUploadedFilePath()
Returns:
uploaded file path

setUploadedFilePath

public void setUploadedFilePath(String newFilePath)
Parameters:
newFilePath -

getFileContentType

public String getFileContentType()
Returns:
file content type

setFileContentType

public void setFileContentType(String newFileContentType)
Parameters:
newFileContentType -

getTargetFolder

public String getTargetFolder()
Gets the targetFolder attribute of the ResourceUploadControl object

Returns:
The targetFolder value

setTargetFolder

public void setTargetFolder(String newPath)
Sets the targetFolder attribute of the ResourceUploadControl object

Parameters:
newPath - The new targetFolder value

getServerFilePath

public String getServerFilePath()
Gets the serverFilePath attribute of the ResourceUploadControl object

Returns:
The serverFilePath value

setServerFilePath

public void setServerFilePath(String newServerFilePath)
Sets the serverFilePath attribute of the ResourceUploadControl object

Parameters:
newServerFilePath - The new serverFilePath value

getDisplayHeader

public boolean getDisplayHeader()
Gets the displayHeader attribute of the ResourceUploadControl object

Returns:
The displayHeader value

setDisplayHeader

public void setDisplayHeader(boolean newIsViewValue)
Sets the displayHeader attribute of the ResourceUploadControl object

Parameters:
newIsViewValue - The new displayHeader value

getFurtherUploadsFlag

public boolean getFurtherUploadsFlag()
Gets the furtherUploadsFlag attribute of the ResourceUploadControl object

Returns:
The furtherUploadsFlag value

setFurtherUploadsFlag

public void setFurtherUploadsFlag(boolean newFlagValue)
Sets the furtherUploadsFlag attribute of the ResourceUploadControl object

Parameters:
newFlagValue - The new furtherUploadsFlag value

getFileExtension

public String getFileExtension()
Gets the fileExtension attribute of the ResourceUploadControl object

Returns:
The fileExtension value

setFileExtension

public void setFileExtension(String newExtension)
Sets the fileExtension attribute of the ResourceUploadControl object

Parameters:
newExtension - The new fileExtension value

setNewResourceFlag

public void setNewResourceFlag(boolean flag)
Sets the newResourceFlag attribute of the ResourceUploadControl object

Parameters:
flag - The new newResourceFlag value

getNewResourceFlag

public boolean getNewResourceFlag()
Gets the newResourceFlag attribute of the ResourceUploadControl object

Returns:
The newResourceFlag value

setRenameResource

public void setRenameResource(boolean flag)
Sets the renameResource attribute of the ResourceUploadControl object

Parameters:
flag - The new renameResource value

getRenameResource

public boolean getRenameResource()
Gets the renameResource attribute of the ResourceUploadControl object

Returns:
The renameResource value

createNestedControls

protected void createNestedControls()
                             throws com.sapportals.wdf.WdfException
Register composite parts

Overrides:
createNestedControls in class com.sapportals.wdf.stack.Control
Throws:
com.sapportals.wdf.WdfException - Exception raised in failure situation

render

public com.sapportals.htmlb.Component render()
                                      throws com.sapportals.wdf.WdfException
Build the UI for this control

Specified by:
render in class com.sapportals.wdf.stack.Control
Returns:
A component containing the rendered control
Throws:
com.sapportals.wdf.WdfException - Exception raised in failure situation

overwriteExistingName

public com.sapportals.htmlb.RadioButtonGroup overwriteExistingName(boolean versionEnabled)
Creates a radiobutton group for setting the next actions ( overwrite, save with another name...) regarding uploading an existing resource. According with the versionFlag state, the actions will be different

Parameters:
versionEnabled - - the 'keep version' status of the existing resource
Returns:
RadioButtonGroup with the actions

renderKeepProperties

public com.sapportals.htmlb.Component renderKeepProperties(boolean versionEnabled)
Renders the checkbox for keeping the properties from previous file uploaded

Parameters:
versionEnabled - - the 'keep version' status of the existing resource
Returns:
RadioButtonGroup with the actions

inputNewName

public com.sapportals.htmlb.Component inputNewName(com.sapportals.htmlb.GridLayout inputGrid,
                                                   int row)
Create a Component which contains a Label and a for InputText for the new name of the file

Parameters:
inputGrid - - the GridLayout were the components will be placed
row - - the row number were the components will be placed into GridLayout
Returns:
- the GridLayout created

onYes

public com.sapportals.wdf.event.WdfEvent onYes(com.sapportals.htmlb.event.Event event)
                                        throws WcmException
Parameters:
event -
Returns:
wdf event on yes
Throws:
WcmException - Exception raised in failure situation

onNo

public com.sapportals.wdf.event.WdfEvent onNo(com.sapportals.htmlb.event.Event event)
                                       throws WcmException
Parameters:
event -
Returns:
wdf event on no
Throws:
WcmException - Exception raised in failure situation

onUpload

public com.sapportals.wdf.event.WdfEvent onUpload(com.sapportals.htmlb.event.Event event)
                                           throws WcmException
Parameters:
event -
Returns:
wdf event on upload
Throws:
WcmException - Exception raised in failure situation

onOk

public com.sapportals.wdf.event.WdfEvent onOk(com.sapportals.htmlb.event.Event event)
                                       throws WcmException
Parameters:
event -
Returns:
wdf event on ok
Throws:
WcmException - Exception raised in failure situation

onCancel

public com.sapportals.wdf.event.WdfEvent onCancel(com.sapportals.htmlb.event.Event event)
                                           throws WcmException
Parameters:
event -
Returns:
wdf event on cancel
Throws:
WcmException

onDone

public com.sapportals.wdf.event.WdfEvent onDone(com.sapportals.htmlb.event.Event event)
                                         throws WcmException
Description of the Method

Parameters:
event - Description of the param
Returns:
Description of the Return Value
Throws:
WcmException - Exception raised in failure situation

receive

public void receive(com.sapportals.wdf.event.WdfEvent cflEvent)
             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
Parameters:
cflEvent -
Throws:
com.sapportals.wdf.WdfException

checkExistingName

public boolean checkExistingName(String theName)
Check if already the input name exists as Resource name

Parameters:
theName - - the resource name
Returns:
- a resource name which is unique

readInputData

protected void readInputData()
                      throws com.sapportals.wdf.WdfException
Overrides:
readInputData in class WcmBaseControl
Throws:
com.sapportals.wdf.WdfException

setResourceType

public void setResourceType(String newResourceTypes)

getResourceType

public String getResourceType()

setProperties

public void setProperties(String properties)

getProperties

public String getProperties()
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