Package com.day.cq.wcm.api.components
Class InplaceEditingConfig
- java.lang.Object
-
- com.day.cq.wcm.api.components.InplaceEditingConfig
-
public class InplaceEditingConfig extends Object
Implements the basic inplace editing configuration.
-
-
Field Summary
Fields Modifier and Type Field Description static String
NN_CONFIG_DEFAULT
Default path to the editor-specific config nodestatic String
PN_ACTIVE
Name of property containing the flag if inplace editing is activestatic String
PN_CONFIG_PATH
Name of property containing the path to the editor's configuration nodestatic String
PN_EDITOR_TYPE
Name of property containing the inplace editor's type
-
Constructor Summary
Constructors Constructor Description InplaceEditingConfig(InplaceEditingConfig config)
Creates a new basic inplace editing configuration from the specified configuration.InplaceEditingConfig(Node configNode)
Creates a new basic inplace editing configuration from the given configurationNode
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,ChildEditor>
getChildEditors()
Returns a unmodifiable map of configurations of inplace child editors.String
getConfigPath()
Gets the path to the editor-specific configuration.String
getEditorType()
Gets the type of inplace editor to be used.boolean
isActive()
Determines if inplace editing is active for this component.
-
-
-
Field Detail
-
PN_ACTIVE
public static final String PN_ACTIVE
Name of property containing the flag if inplace editing is active- See Also:
- Constant Field Values
-
PN_EDITOR_TYPE
public static final String PN_EDITOR_TYPE
Name of property containing the inplace editor's type- See Also:
- Constant Field Values
-
PN_CONFIG_PATH
public static final String PN_CONFIG_PATH
Name of property containing the path to the editor's configuration node- See Also:
- Constant Field Values
-
NN_CONFIG_DEFAULT
public static final String NN_CONFIG_DEFAULT
Default path to the editor-specific config node- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InplaceEditingConfig
public InplaceEditingConfig(Node configNode) throws RepositoryException
Creates a new basic inplace editing configuration from the given configurationNode
.- Parameters:
configNode
- The node to generate the basic configuration from.- Throws:
RepositoryException
- This exception is thrown for repository access related issues.
-
InplaceEditingConfig
public InplaceEditingConfig(InplaceEditingConfig config)
Creates a new basic inplace editing configuration from the specified configuration.- Parameters:
config
- Existing configuration to clone
-
-
Method Detail
-
isActive
public boolean isActive()
Determines if inplace editing is active for this component.- Returns:
true
if inplace editing is active for this component
-
getEditorType
public String getEditorType()
Gets the type of inplace editor to be used. The returnedString
must match a inplace editor module that is registered clientside under that type. Note thatisActive
will returnfalse
if no inplace editing module is specified (and getInplaceEditor will returnnull
)- Returns:
- Type of the inplace module;
null
if no inplace editing module is defined
-
getConfigPath
public String getConfigPath()
Gets the path to the editor-specific configuration. The editor will use this path to load its configuration through an JSON request accordingly. Note that there must not necessarily be a node at the specified path; hence the clientside implementation must internally use suitable default values- Returns:
- Path to the configuration node
-
getChildEditors
public Map<String,ChildEditor> getChildEditors()
Returns a unmodifiable map of configurations of inplace child editors. the keys are the ids of the configs.- Returns:
- map of inplace child editors configurations.
-
-