com.ibm.portal.dnd
Interface DNDMarkupGenerator


public interface DNDMarkupGenerator

Implementations of DNDMarkupGenerator produce the markup required for DnD operations.

The order in which methods in the class are called is important. First, it is important that doLibraryIncludeMarkup is called at least once per request. Developer's should always call this method immediately after retrieving the DNDMarkupGenerator and include the markup returned by this method. In addition, the markup generated by methods in this class should be included in an application's markup in a "well formed" manner. For example, it is valid to include the results of the following method calls in this order:

1. doBeginDNDSource
2. doBeginDNDTarget
3. doEndDNDTarget
4. doEndDNDSource

But, it is not valid to include the results of the following method calls in this order:

1. doBeginDNDSource
2. doBeginDNDTarget
3. doEndDNDSource
4. doEndDNDTarget

Since:
6.0

Method Summary
 void doBeginDNDSource(DNDSource src, javax.portlet.PortletRequest req, javax.portlet.PortletResponse res, java.io.Writer out, boolean includeDragHandle)
          Generates markup that needs to be placed at the beginning of a DNDSource.
 void doBeginDNDSource(DNDSource src, javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, java.io.Writer out, boolean includeDragHandle)
          Generates markup that needs to be placed at the beginning of a DNDSource.
 void doBeginDNDSourceHandle(DNDSource src, javax.portlet.PortletRequest req, javax.portlet.PortletResponse res, java.io.Writer out)
          Generates markup that needs to be placed at the beginning of a DNDSource handle.
 void doBeginDNDSourceHandle(DNDSource src, javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, java.io.Writer out)
          Generates markup that needs to be placed at the beginning of a DNDSource handle.
 void doBeginDNDTarget(DNDTarget tgt, javax.portlet.PortletRequest req, javax.portlet.PortletResponse res, java.io.Writer out)
          Generates markup that needs to be placed at the beginning of a DNDTarget.
 void doBeginDNDTarget(DNDTarget tgt, javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, java.io.Writer out)
          Generates markup that needs to be placed at the beginning of a DNDTarget.
 void doEndDNDSource(DNDSource src, javax.portlet.PortletRequest req, javax.portlet.PortletResponse res, java.io.Writer out)
          Generates markup that needs to be placed at the end of a DNDSource.
 void doEndDNDSource(DNDSource src, javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, java.io.Writer out)
          Generates markup that needs to be placed at the end of a DNDSource.
 void doEndDNDSourceHandle(DNDSource src, javax.portlet.PortletRequest req, javax.portlet.PortletResponse res, java.io.Writer out)
          Generates markup that needs to be placed at the end of a DNDSource handle.
 void doEndDNDSourceHandle(DNDSource src, javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, java.io.Writer out)
          Generates markup that needs to be placed at the end of a DNDSource handle.
 void doEndDNDTarget(DNDTarget tgt, javax.portlet.PortletRequest req, javax.portlet.PortletResponse res, java.io.Writer out)
          Generates markup that needs to be placed at the end of a DNDTarget.
 void doEndDNDTarget(DNDTarget tgt, javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, java.io.Writer out)
          Generates markup that needs to be placed at the end of a DNDTarget.
 void doLibraryIncludeMarkup(javax.portlet.PortletRequest req, javax.portlet.PortletResponse res, java.io.Writer out)
          This method generates the markup that includes required DnD javascript libraries in a response.
 void doLibraryIncludeMarkup(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, java.io.Writer out)
          This method generates the markup that includes required DnD javascript libraries in a response.
 

Method Detail

doLibraryIncludeMarkup

void doLibraryIncludeMarkup(javax.servlet.ServletRequest req,
                            javax.servlet.ServletResponse res,
                            java.io.Writer out)
This method generates the markup that includes required DnD javascript libraries in a response. These libraries should only be "included" once, so markup will only be written out on the first call made to this method during a request. Any subsequent calls for a given request will not write any markup. Since this markup is only generated once per request, all components on a page using DnD must trust that other components on the page will insert this markup into the page if they are the first component to call this method. If this markup is not included in the request, all DnD function will break.

Parameters:
req - the servlet request
res - the servlet response
out - the java.io.Writer to write output to

doLibraryIncludeMarkup

void doLibraryIncludeMarkup(javax.portlet.PortletRequest req,
                            javax.portlet.PortletResponse res,
                            java.io.Writer out)
This method generates the markup that includes required DnD javascript libraries in a response. These libraries should only be "included" once, so markup will only be written out on the first call made to this method during a request. Any subsequent calls for a given request will not write any markup. Since this markup is only generated once per request, all components on a page using DnD must trust that other components on the page will insert this markup into the page if they are the first component to call this method. If this markup is not included in the request, all DnD function will break.

Parameters:
req - the portlet request
res - the portlet response
out - the java.io.Writer to write output to

doBeginDNDSource

void doBeginDNDSource(DNDSource src,
                      javax.servlet.ServletRequest req,
                      javax.servlet.ServletResponse res,
                      java.io.Writer out,
                      boolean includeDragHandle)
                      throws DNDMarkupGeneratorException
Generates markup that needs to be placed at the beginning of a DNDSource.

Parameters:
src - the DNDSource markup is being generated for
req - the servlet request
res - the servlet response
out - the java.io.Writer to write output to
includeDragHandle - true if we should generate a handle from this method
Throws:
DNDMarkupGeneratorException - This exception will be thrown if, for some reason, the markup cannot be generated.

doBeginDNDSource

void doBeginDNDSource(DNDSource src,
                      javax.portlet.PortletRequest req,
                      javax.portlet.PortletResponse res,
                      java.io.Writer out,
                      boolean includeDragHandle)
                      throws DNDMarkupGeneratorException
Generates markup that needs to be placed at the beginning of a DNDSource.

Parameters:
src - the DNDSource markup is being generated for
req - the portlet request
res - the portlet response
out - the java.io.Writer to write output to
includeDragHandle - true if we should generate a handle from this method
Throws:
DNDMarkupGeneratorException - This exception will be thrown if, for some reason, the markup cannot be generated.

doBeginDNDSourceHandle

void doBeginDNDSourceHandle(DNDSource src,
                            javax.servlet.ServletRequest req,
                            javax.servlet.ServletResponse res,
                            java.io.Writer out)
                            throws DNDMarkupGeneratorException
Generates markup that needs to be placed at the beginning of a DNDSource handle.

Parameters:
src - the DNDSource that handle markup is being generated for
req - the servlet request
res - the servlet response
out - the java.io.Writer to write output to
Throws:
DNDMarkupGeneratorException - This exception will be thrown if, for some reason, the markup cannot be generated.

doBeginDNDSourceHandle

void doBeginDNDSourceHandle(DNDSource src,
                            javax.portlet.PortletRequest req,
                            javax.portlet.PortletResponse res,
                            java.io.Writer out)
                            throws DNDMarkupGeneratorException
Generates markup that needs to be placed at the beginning of a DNDSource handle.

Parameters:
src - the DNDSource that handle markup is being generated for
req - the portlet request
res - the portlet response
out - the java.io.Writer to write output to
Throws:
DNDMarkupGeneratorException - This exception will be thrown if, for some reason, the markup cannot be generated.

doBeginDNDTarget

void doBeginDNDTarget(DNDTarget tgt,
                      javax.servlet.ServletRequest req,
                      javax.servlet.ServletResponse res,
                      java.io.Writer out)
                      throws DNDMarkupGeneratorException
Generates markup that needs to be placed at the beginning of a DNDTarget.

Parameters:
tgt - the DNDTarget markup is being generated for
req - the servlet request
res - the servlet response
out - the java.io.Writer to write output to
Throws:
DNDMarkupGeneratorException - This exception will be thrown if, for some reason, the markup cannot be generated.

doBeginDNDTarget

void doBeginDNDTarget(DNDTarget tgt,
                      javax.portlet.PortletRequest req,
                      javax.portlet.PortletResponse res,
                      java.io.Writer out)
                      throws DNDMarkupGeneratorException
Generates markup that needs to be placed at the beginning of a DNDTarget.

Parameters:
tgt - the DNDTarget markup is being generated for
req - the portlet request
res - the portlet response
out - the java.io.Writer to write output to
Throws:
DNDMarkupGeneratorException - This exception will be thrown if, for some reason, the markup cannot be generated.

doEndDNDSource

void doEndDNDSource(DNDSource src,
                    javax.servlet.ServletRequest req,
                    javax.servlet.ServletResponse res,
                    java.io.Writer out)
                    throws DNDMarkupGeneratorException
Generates markup that needs to be placed at the end of a DNDSource.

Parameters:
src - the DNDSource markup is being generated for
req - the servlet request
res - the servlet response
out - the java.io.Writer to write output to
Throws:
DNDMarkupGeneratorException - This exception will be thrown if, for some reason, the markup cannot be generated.

doEndDNDSource

void doEndDNDSource(DNDSource src,
                    javax.portlet.PortletRequest req,
                    javax.portlet.PortletResponse res,
                    java.io.Writer out)
                    throws DNDMarkupGeneratorException
Generates markup that needs to be placed at the end of a DNDSource.

Parameters:
src - the DNDSource markup is being generated for
req - the portlet request
res - the portlet response
out - the java.io.Writer to write output to
Throws:
DNDMarkupGeneratorException - This exception will be thrown if, for some reason, the markup cannot be generated.

doEndDNDSourceHandle

void doEndDNDSourceHandle(DNDSource src,
                          javax.servlet.ServletRequest req,
                          javax.servlet.ServletResponse res,
                          java.io.Writer out)
                          throws DNDMarkupGeneratorException
Generates markup that needs to be placed at the end of a DNDSource handle.

Parameters:
src - the DNDSource that handle markup is being generated for
req - the servlet request
res - the servlet response
out - the java.io.Writer to write output to
Throws:
DNDMarkupGeneratorException - This exception will be thrown if, for some reason, the markup cannot be generated.

doEndDNDSourceHandle

void doEndDNDSourceHandle(DNDSource src,
                          javax.portlet.PortletRequest req,
                          javax.portlet.PortletResponse res,
                          java.io.Writer out)
                          throws DNDMarkupGeneratorException
Generates markup that needs to be placed at the end of a DNDSource handle.

Parameters:
src - the DNDSource that handle markup is being generated for
req - the portlet request
res - the portlet response
out - the java.io.Writer to write output to
Throws:
DNDMarkupGeneratorException - This exception will be thrown if, for some reason, the markup cannot be generated.

doEndDNDTarget

void doEndDNDTarget(DNDTarget tgt,
                    javax.servlet.ServletRequest req,
                    javax.servlet.ServletResponse res,
                    java.io.Writer out)
                    throws DNDMarkupGeneratorException
Generates markup that needs to be placed at the end of a DNDTarget.

Parameters:
tgt - the DNDTarget markup is being generated for
req - the servlet request
res - the servlet response
out - the java.io.Writer to write output to
Throws:
DNDMarkupGeneratorException - This exception will be thrown if, for some reason, the markup cannot be generated.

doEndDNDTarget

void doEndDNDTarget(DNDTarget tgt,
                    javax.portlet.PortletRequest req,
                    javax.portlet.PortletResponse res,
                    java.io.Writer out)
                    throws DNDMarkupGeneratorException
Generates markup that needs to be placed at the end of a DNDTarget.

Parameters:
tgt - the DNDTarget markup is being generated for
req - the portlet request
res - the portlet response
out - the java.io.Writer to write output to
Throws:
DNDMarkupGeneratorException - This exception will be thrown if, for some reason, the markup cannot be generated.