Class DropTargetImpl
- java.lang.Object
-
- io.wcm.handler.commons.editcontext.DropTargetImpl
-
- All Implemented Interfaces:
com.day.cq.commons.JSONItem
,com.day.cq.wcm.api.components.DropTarget
@ProviderType public final class DropTargetImpl extends java.lang.Object implements com.day.cq.wcm.api.components.DropTarget
DropTarget
implementation.
-
-
Constructor Summary
Constructors Constructor Description DropTargetImpl(@NotNull java.lang.String name, @NotNull java.lang.String propertyName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
getAccept()
Returns the mime-type accept patternsjava.lang.String[]
getGroups()
Returns the DD groups for this targetjava.lang.String
getId()
Returns the id for the drop target element.java.lang.String
getName()
Returns the name of this drop targetjava.util.Map<java.lang.String,java.lang.String>
getParameters()
Returns a map of additional parameters to be set on the target nodejava.lang.String
getPropertyName()
Returns the property name to use for this drop target.DropTargetImpl
setAccept(java.lang.String @NotNull [] values)
DropTargetImpl
setGroups(java.lang.String @NotNull [] values)
DropTargetImpl
setParameters(@NotNull java.util.Map<java.lang.String,java.lang.String> value)
void
write(org.apache.sling.commons.json.io.JSONWriter out)
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of this drop target- Specified by:
getName
in interfacecom.day.cq.wcm.api.components.DropTarget
- Returns:
- drop target name
-
getId
public java.lang.String getId()
Returns the id for the drop target element. this is currently the same as the name, prefixed with theDropTarget.CSS_CLASS_PREFIX
- Specified by:
getId
in interfacecom.day.cq.wcm.api.components.DropTarget
- Returns:
- drop target id
-
getPropertyName
public java.lang.String getPropertyName()
Returns the property name to use for this drop target.- Specified by:
getPropertyName
in interfacecom.day.cq.wcm.api.components.DropTarget
- Returns:
- the property name.
-
getGroups
public java.lang.String[] getGroups()
Returns the DD groups for this target- Specified by:
getGroups
in interfacecom.day.cq.wcm.api.components.DropTarget
- Returns:
- the DD groups.
-
setGroups
public DropTargetImpl setGroups(java.lang.String @NotNull [] values)
- Parameters:
values
- the DD groups.- Returns:
- this
-
getAccept
public java.lang.String[] getAccept()
Returns the mime-type accept patterns- Specified by:
getAccept
in interfacecom.day.cq.wcm.api.components.DropTarget
- Returns:
- the accept patterns
-
setAccept
public DropTargetImpl setAccept(java.lang.String @NotNull [] values)
- Parameters:
values
- the accept patterns- Returns:
- this
-
getParameters
public java.util.Map<java.lang.String,java.lang.String> getParameters()
Returns a map of additional parameters to be set on the target node- Specified by:
getParameters
in interfacecom.day.cq.wcm.api.components.DropTarget
- Returns:
- a map of additional parameters.
-
setParameters
public DropTargetImpl setParameters(@NotNull @NotNull java.util.Map<java.lang.String,java.lang.String> value)
- Parameters:
value
- a map of additional parameters.- Returns:
- this
-
write
public void write(org.apache.sling.commons.json.io.JSONWriter out) throws org.apache.sling.commons.json.JSONException
- Specified by:
write
in interfacecom.day.cq.commons.JSONItem
- Throws:
org.apache.sling.commons.json.JSONException
-
-