Class 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.
    • Field Summary

      • Fields inherited from interface com.day.cq.wcm.api.components.DropTarget

        CSS_CLASS_PREFIX
    • 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 patterns
      java.lang.String[] getGroups()
      Returns the DD groups for this target
      java.lang.String getId()
      Returns the id for the drop target element.
      java.lang.String getName()
      Returns the name of this drop target
      java.util.Map<java.lang.String,​java.lang.String> getParameters()
      Returns a map of additional parameters to be set on the target node
      java.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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DropTargetImpl

        public DropTargetImpl​(@NotNull
                              @NotNull java.lang.String name,
                              @NotNull
                              @NotNull java.lang.String propertyName)
        Parameters:
        name - drop target name
        propertyName - property name
    • Method Detail

      • getName

        public java.lang.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 java.lang.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 java.lang.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 java.lang.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​(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 interface com.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 interface com.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 interface com.day.cq.commons.JSONItem
        Throws:
        org.apache.sling.commons.json.JSONException