Class DropTargetImpl

  • All Implemented Interfaces:
    com.day.cq.commons.JSONItem, com.day.cq.wcm.api.components.DropTarget

    @ProviderType
    public final class DropTargetImpl
    extends Object
    implements com.day.cq.wcm.api.components.DropTarget
    DropTarget implementation.
    • Constructor Detail

      • DropTargetImpl

        public DropTargetImpl​(String name,
                              String propertyName)
        Parameters:
        name - drop target name
        propertyName - property name
    • Method Detail

      • getName

        public String getName()
        Returns the name of this drop target
        Specified by:
        getName in interface com.day.cq.wcm.api.components.DropTarget
        Returns:
        drop target name
      • getId

        public String getId()
        Returns the id for the drop target element. this is currently the same as the name, prefixed with the DropTarget.CSS_CLASS_PREFIX
        Specified by:
        getId in interface com.day.cq.wcm.api.components.DropTarget
        Returns:
        drop target id
      • getPropertyName

        public String getPropertyName()
        Returns the property name to use for this drop target.
        Specified by:
        getPropertyName in interface com.day.cq.wcm.api.components.DropTarget
        Returns:
        the property name.
      • getGroups

        public String[] getGroups()
        Returns the DD groups for this target
        Specified by:
        getGroups in interface com.day.cq.wcm.api.components.DropTarget
        Returns:
        the DD groups.
      • setGroups

        public DropTargetImpl setGroups​(String[] values)
        Parameters:
        values - the DD groups.
        Returns:
        this
      • getAccept

        public String[] getAccept()
        Returns the mime-type accept patterns
        Specified by:
        getAccept in interface com.day.cq.wcm.api.components.DropTarget
        Returns:
        the accept patterns
      • setAccept

        public DropTargetImpl setAccept​(String[] values)
        Parameters:
        values - the accept patterns
        Returns:
        this
      • getParameters

        public Map<String,​String> getParameters()
        Returns a map of additional parameters to be set on the target node
        Specified by:
        getParameters in interface com.day.cq.wcm.api.components.DropTarget
        Returns:
        a map of additional parameters.
      • setParameters

        public DropTargetImpl setParameters​(Map<String,​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 interface com.day.cq.commons.JSONItem
        Throws:
        org.apache.sling.commons.json.JSONException