Package org.opencms.gwt.client.property
Class CmsSimplePropertyEditorHandler
- java.lang.Object
-
- org.opencms.gwt.client.property.CmsSimplePropertyEditorHandler
-
- All Implemented Interfaces:
I_CmsPropertyEditorHandler
- Direct Known Subclasses:
CmsEditProperties.PropertyEditorHandler
public class CmsSimplePropertyEditorHandler extends java.lang.Object implements I_CmsPropertyEditorHandler
A simpler implementation of the property editor handler interface which only provides the data to edit a single file's properties (i.e. does not support combined folder/default file property editing.- Since:
- 8.0.0
-
-
Field Summary
Fields Modifier and Type Field Description protected org.opencms.gwt.shared.property.CmsPropertiesBean
m_propertiesBean
The data necessary for editing the properties.
-
Constructor Summary
Constructors Constructor Description CmsSimplePropertyEditorHandler(I_CmsContextMenuHandler handler)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getAllPropertyNames()
Gets a list of the names of available properties.protected I_CmsContextMenuHandler
getContextMenuHandler()
Returns the context menu handler.org.opencms.util.CmsUUID
getDefaultFileId()
Returns the default file id, if available.java.util.Map<java.lang.String,org.opencms.gwt.shared.property.CmsClientProperty>
getDefaultFileProperties()
Returns the default file properties, if available.java.lang.String
getDialogTitle()
Returns the text which should be used for the title of the sitemap entry editor dialog.java.util.List<java.lang.String>
getForbiddenUrlNames()
Returns the URL names which the new URL name of the entry must not be equal to.org.opencms.util.CmsUUID
getId()
Returns the structure id of the resource being edited.org.opencms.gwt.shared.property.CmsClientProperty
getInheritedProperty(java.lang.String name)
Returns an inherited property value.java.lang.String
getModeClass()
Returns the class name which should be added when displaying resource info boxes.java.lang.String
getName()
Returns the URL name with which the sitemap entry editor should be initialized.java.util.Map<java.lang.String,org.opencms.gwt.shared.property.CmsClientProperty>
getOwnProperties()
Returns the properties of the resource being edited.org.opencms.gwt.shared.CmsListInfoBean
getPageInfo()
Returns the page info bean.java.lang.String
getPath()
Gets the path of the resource being edited.java.util.Map<java.lang.String,org.opencms.gwt.shared.property.CmsClientTemplateBean>
getPossibleTemplates()
Returns a map of beans representing the selectable templates.void
handleSubmit(java.lang.String newUrlName, java.lang.String vfsPath, java.util.List<org.opencms.gwt.shared.property.CmsPropertyModification> propertyChanges, boolean editedName, CmsReloadMode reloadMode)
Handles the submit action for the sitemap entry editor.boolean
hasEditableName()
Returns if the handled entry has an editable name.boolean
isFolder()
Checks if the resource being edited is a folder.boolean
isHiddenProperty(java.lang.String key)
Checks whether the property with the given name should be hidden.boolean
isSimpleMode()
Should return true if the sitemap editor is running in simple mode.protected void
onSubmitSuccess()
Called when the form is submitted successfully.protected void
saveProperties(org.opencms.gwt.shared.property.CmsPropertyChangeSet changes, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
Save properties.void
setEditableName(boolean editable)
Enables / disables editable file name.void
setPropertiesBean(org.opencms.gwt.shared.property.CmsPropertiesBean propertiesBean)
Sets the data necessary to edit the properties.void
setPropertySaver(I_CmsPropertySaver saver)
Sets the property saver.boolean
useAdeTemplates()
Returns true if the property editor should use only ADE templates.
-
-
-
Field Detail
-
m_propertiesBean
protected org.opencms.gwt.shared.property.CmsPropertiesBean m_propertiesBean
The data necessary for editing the properties.
-
-
Constructor Detail
-
CmsSimplePropertyEditorHandler
public CmsSimplePropertyEditorHandler(I_CmsContextMenuHandler handler)
Creates a new instance.- Parameters:
handler
- the context menu handler
-
-
Method Detail
-
getAllPropertyNames
public java.util.List<java.lang.String> getAllPropertyNames()
Description copied from interface:I_CmsPropertyEditorHandler
Gets a list of the names of available properties.- Specified by:
getAllPropertyNames
in interfaceI_CmsPropertyEditorHandler
- Returns:
- a list of property names
- See Also:
I_CmsPropertyEditorHandler.getAllPropertyNames()
-
getDefaultFileId
public org.opencms.util.CmsUUID getDefaultFileId()
Description copied from interface:I_CmsPropertyEditorHandler
Returns the default file id, if available.- Specified by:
getDefaultFileId
in interfaceI_CmsPropertyEditorHandler
- Returns:
- the default file id
- See Also:
I_CmsPropertyEditorHandler.getDefaultFileId()
-
getDefaultFileProperties
public java.util.Map<java.lang.String,org.opencms.gwt.shared.property.CmsClientProperty> getDefaultFileProperties()
Description copied from interface:I_CmsPropertyEditorHandler
Returns the default file properties, if available.- Specified by:
getDefaultFileProperties
in interfaceI_CmsPropertyEditorHandler
- Returns:
- the default file properties
- See Also:
I_CmsPropertyEditorHandler.getDefaultFileProperties()
-
getDialogTitle
public java.lang.String getDialogTitle()
Description copied from interface:I_CmsPropertyEditorHandler
Returns the text which should be used for the title of the sitemap entry editor dialog.- Specified by:
getDialogTitle
in interfaceI_CmsPropertyEditorHandler
- Returns:
- the dialog title for the sitemap entry editor
- See Also:
I_CmsPropertyEditorHandler.getDialogTitle()
-
getForbiddenUrlNames
public java.util.List<java.lang.String> getForbiddenUrlNames()
Description copied from interface:I_CmsPropertyEditorHandler
Returns the URL names which the new URL name of the entry must not be equal to.- Specified by:
getForbiddenUrlNames
in interfaceI_CmsPropertyEditorHandler
- Returns:
- a list of forbidden URL names
- See Also:
I_CmsPropertyEditorHandler.getForbiddenUrlNames()
-
getId
public org.opencms.util.CmsUUID getId()
Description copied from interface:I_CmsPropertyEditorHandler
Returns the structure id of the resource being edited.- Specified by:
getId
in interfaceI_CmsPropertyEditorHandler
- Returns:
- the structure id of the resource being edited
- See Also:
I_CmsPropertyEditorHandler.getId()
-
getInheritedProperty
public org.opencms.gwt.shared.property.CmsClientProperty getInheritedProperty(java.lang.String name)
Description copied from interface:I_CmsPropertyEditorHandler
Returns an inherited property value.This is the value that the resource being edited would inherit if it didn't define its own value for that property.
- Specified by:
getInheritedProperty
in interfaceI_CmsPropertyEditorHandler
- Parameters:
name
- the name of the property- Returns:
- the inherited property
- See Also:
I_CmsPropertyEditorHandler.getInheritedProperty(java.lang.String)
-
getModeClass
public java.lang.String getModeClass()
Description copied from interface:I_CmsPropertyEditorHandler
Returns the class name which should be added when displaying resource info boxes.- Specified by:
getModeClass
in interfaceI_CmsPropertyEditorHandler
- Returns:
- the class name to use for displaying resource info boxes
- See Also:
I_CmsPropertyEditorHandler.getModeClass()
-
getName
public java.lang.String getName()
Description copied from interface:I_CmsPropertyEditorHandler
Returns the URL name with which the sitemap entry editor should be initialized.- Specified by:
getName
in interfaceI_CmsPropertyEditorHandler
- Returns:
- the initial URL name
- See Also:
I_CmsPropertyEditorHandler.getName()
-
getOwnProperties
public java.util.Map<java.lang.String,org.opencms.gwt.shared.property.CmsClientProperty> getOwnProperties()
Description copied from interface:I_CmsPropertyEditorHandler
Returns the properties of the resource being edited.- Specified by:
getOwnProperties
in interfaceI_CmsPropertyEditorHandler
- Returns:
- the properties of the resource being edited
- See Also:
I_CmsPropertyEditorHandler.getOwnProperties()
-
getPageInfo
public org.opencms.gwt.shared.CmsListInfoBean getPageInfo()
Description copied from interface:I_CmsPropertyEditorHandler
Returns the page info bean.- Specified by:
getPageInfo
in interfaceI_CmsPropertyEditorHandler
- Returns:
- the page info bean
- See Also:
I_CmsPropertyEditorHandler.getPageInfo()
-
getPath
public java.lang.String getPath()
Description copied from interface:I_CmsPropertyEditorHandler
Gets the path of the resource being edited.- Specified by:
getPath
in interfaceI_CmsPropertyEditorHandler
- Returns:
- the path of the resource being edited
- See Also:
I_CmsPropertyEditorHandler.getPath()
-
getPossibleTemplates
public java.util.Map<java.lang.String,org.opencms.gwt.shared.property.CmsClientTemplateBean> getPossibleTemplates()
Description copied from interface:I_CmsPropertyEditorHandler
Returns a map of beans representing the selectable templates.- Specified by:
getPossibleTemplates
in interfaceI_CmsPropertyEditorHandler
- Returns:
- a map of selectable templates
- See Also:
I_CmsPropertyEditorHandler.getPossibleTemplates()
-
handleSubmit
public void handleSubmit(java.lang.String newUrlName, java.lang.String vfsPath, java.util.List<org.opencms.gwt.shared.property.CmsPropertyModification> propertyChanges, boolean editedName, CmsReloadMode reloadMode)
Description copied from interface:I_CmsPropertyEditorHandler
Handles the submit action for the sitemap entry editor.- Specified by:
handleSubmit
in interfaceI_CmsPropertyEditorHandler
- Parameters:
newUrlName
- the new url namevfsPath
- the new vfs pathpropertyChanges
- the property changeseditedName
- if true, the URL name has been editedreloadMode
- the information about which entry should reloaded- See Also:
I_CmsPropertyEditorHandler.handleSubmit(java.lang.String, java.lang.String, java.util.List, boolean, org.opencms.gwt.client.property.CmsReloadMode)
-
hasEditableName
public boolean hasEditableName()
Description copied from interface:I_CmsPropertyEditorHandler
Returns if the handled entry has an editable name.- Specified by:
hasEditableName
in interfaceI_CmsPropertyEditorHandler
- Returns:
true
if the handled entry has an editable name- See Also:
I_CmsPropertyEditorHandler.hasEditableName()
-
isFolder
public boolean isFolder()
Description copied from interface:I_CmsPropertyEditorHandler
Checks if the resource being edited is a folder.- Specified by:
isFolder
in interfaceI_CmsPropertyEditorHandler
- Returns:
- true if the resource being edited is a folder
- See Also:
I_CmsPropertyEditorHandler.isFolder()
-
isHiddenProperty
public boolean isHiddenProperty(java.lang.String key)
Description copied from interface:I_CmsPropertyEditorHandler
Checks whether the property with the given name should be hidden.- Specified by:
isHiddenProperty
in interfaceI_CmsPropertyEditorHandler
- Parameters:
key
- the property name- Returns:
- true if the property should be hidden
- See Also:
I_CmsPropertyEditorHandler.isHiddenProperty(java.lang.String)
-
isSimpleMode
public boolean isSimpleMode()
Description copied from interface:I_CmsPropertyEditorHandler
Should return true if the sitemap editor is running in simple mode.- Specified by:
isSimpleMode
in interfaceI_CmsPropertyEditorHandler
- Returns:
- true if the sitemap editor is running in simple mode
- See Also:
I_CmsPropertyEditorHandler.isSimpleMode()
-
setEditableName
public void setEditableName(boolean editable)
Enables / disables editable file name.- Parameters:
editable
- true if the file name should be editable
-
setPropertiesBean
public void setPropertiesBean(org.opencms.gwt.shared.property.CmsPropertiesBean propertiesBean)
Sets the data necessary to edit the properties.- Parameters:
propertiesBean
- the data which is used to edit the properties
-
setPropertySaver
public void setPropertySaver(I_CmsPropertySaver saver)
Sets the property saver.- Parameters:
saver
- the property saver
-
useAdeTemplates
public boolean useAdeTemplates()
Description copied from interface:I_CmsPropertyEditorHandler
Returns true if the property editor should use only ADE templates.- Specified by:
useAdeTemplates
in interfaceI_CmsPropertyEditorHandler
- Returns:
- true if the property editor should use only ADE templates
- See Also:
I_CmsPropertyEditorHandler.useAdeTemplates()
-
getContextMenuHandler
protected I_CmsContextMenuHandler getContextMenuHandler()
Returns the context menu handler.- Returns:
- the context menu handler
-
onSubmitSuccess
protected void onSubmitSuccess()
Called when the form is submitted successfully.
-
saveProperties
protected void saveProperties(org.opencms.gwt.shared.property.CmsPropertyChangeSet changes, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
Save properties.- Parameters:
changes
- the property changescallback
- the result callback
-
-