com.ibm.ccd.ui.portlets.massupdate
Class MassUpdatePortlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.ibm.wps.pe.pc.legacy.cache.CacheablePortlet
              extended by org.apache.jetspeed.portlet.Portlet
                  extended by org.apache.jetspeed.portlet.PortletAdapter
                      extended by com.ibm.ccd.ui.portlets.BasePortlet
                          extended by com.ibm.ccd.ui.portlets.massupdate.MassUpdatePortlet
All Implemented Interfaces:
com.ibm.websphere.servlet.cache.CacheableServlet, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, org.apache.jetspeed.portlet.event.ActionListener, org.apache.jetspeed.portlet.PortletSessionListener

public class MassUpdatePortlet
extends BasePortlet
implements org.apache.jetspeed.portlet.event.ActionListener

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.jetspeed.portlet.Portlet
org.apache.jetspeed.portlet.Portlet.Mode, org.apache.jetspeed.portlet.Portlet.ModeModifier
 
Field Summary
 
Fields inherited from class com.ibm.ccd.ui.portlets.BasePortlet
alertDataSource, log
 
Constructor Summary
MassUpdatePortlet()
           
 
Method Summary
 void actionPerformed(org.apache.jetspeed.portlet.event.ActionEvent event)
          Handles all action events
 void deleteSelectedItems(org.apache.jetspeed.portlet.PortletRequest request, MassUpdateBean massUpdateBean)
          Method used for deleting selected Items.It deletes all the checked Items in Mass Edit Portlet
 void doConfigure(org.apache.jetspeed.portlet.PortletRequest request, org.apache.jetspeed.portlet.PortletResponse response)
          This method is called by container when administrator clicks on the configure button on toolbar.
 void doEdit(org.apache.jetspeed.portlet.PortletRequest request, org.apache.jetspeed.portlet.PortletResponse response)
          Handles the Edit mode event
 void doHelp(org.apache.jetspeed.portlet.PortletRequest request, org.apache.jetspeed.portlet.PortletResponse response)
          Handles the Portlet help events
 void doView(org.apache.jetspeed.portlet.PortletRequest request, org.apache.jetspeed.portlet.PortletResponse response)
          This method is called by the container in view mode to display view to user
 boolean getEditableAttribute(Attribute attribute)
          Method decides which attributes are editable in bulk edit screen
 void init(org.apache.jetspeed.portlet.PortletConfig portletConfig)
          This method is called by container while doing initialisation.
protected  java.util.List orderAttributes(java.util.List itemAttrList, int selectedAttributeSize)
          Ordrs the list according to user selection
protected  void setBusinessFunction(org.apache.jetspeed.portlet.PortletRequest request)
          Set th business function
 void updateSelectedItems(org.apache.jetspeed.portlet.PortletRequest request, MassUpdateBean massUpdateBean)
          Method saves all changes done by all the displayed attributes of Item.
 
Methods inherited from class com.ibm.ccd.ui.portlets.BasePortlet
addTransaction, addTransaction, createCommand, createCommand, createContext, getMessageMap, getReqParamArray, getTextLabel, getTextMessages, getWPSContext, handleException
 
Methods inherited from class org.apache.jetspeed.portlet.PortletAdapter
destroy, destroyConcrete, getLastModified, getPortletConfig, getPortletLog, getVariable, initConcrete, login, logout, removeVariable, service, setVariable
 
Methods inherited from class org.apache.jetspeed.portlet.Portlet
destroy, doGet, doPost, doPut, getId, getInitParameter, getInitParameterNames, getLastModified, getPortletSettings, getServletContext, getServletInfo, init, service
 
Methods inherited from class com.ibm.wps.pe.pc.legacy.cache.CacheablePortlet
getSharingPolicy, service
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doTrace
 
Methods inherited from class javax.servlet.GenericServlet
getServletConfig, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MassUpdatePortlet

public MassUpdatePortlet()
Method Detail

setBusinessFunction

protected void setBusinessFunction(org.apache.jetspeed.portlet.PortletRequest request)
Set th business function

Specified by:
setBusinessFunction in class BasePortlet

init

public void init(org.apache.jetspeed.portlet.PortletConfig portletConfig)
          throws org.apache.jetspeed.portlet.UnavailableException
This method is called by container while doing initialisation.

Overrides:
init in class BasePortlet
Parameters:
portletConfig -
Throws:
org.apache.jetspeed.portlet.UnavailableException
See Also:
Portlet.init(PortletConfig)

doView

public void doView(org.apache.jetspeed.portlet.PortletRequest request,
                   org.apache.jetspeed.portlet.PortletResponse response)
            throws org.apache.jetspeed.portlet.PortletException,
                   java.io.IOException
This method is called by the container in view mode to display view to user

Overrides:
doView in class org.apache.jetspeed.portlet.PortletAdapter
Parameters:
request -
response -
Throws:
PortletException, - IOException
org.apache.jetspeed.portlet.PortletException
java.io.IOException

getEditableAttribute

public boolean getEditableAttribute(Attribute attribute)
Method decides which attributes are editable in bulk edit screen

Parameters:
attribute -
Returns:
boolean

doEdit

public void doEdit(org.apache.jetspeed.portlet.PortletRequest request,
                   org.apache.jetspeed.portlet.PortletResponse response)
            throws org.apache.jetspeed.portlet.PortletException,
                   java.io.IOException
Handles the Edit mode event

Overrides:
doEdit in class org.apache.jetspeed.portlet.PortletAdapter
Throws:
org.apache.jetspeed.portlet.PortletException
java.io.IOException

doHelp

public void doHelp(org.apache.jetspeed.portlet.PortletRequest request,
                   org.apache.jetspeed.portlet.PortletResponse response)
            throws org.apache.jetspeed.portlet.PortletException,
                   java.io.IOException
Handles the Portlet help events

Overrides:
doHelp in class BasePortlet
Parameters:
request -
response -
Throws:
org.apache.jetspeed.portlet.PortletException
java.io.IOException

doConfigure

public void doConfigure(org.apache.jetspeed.portlet.PortletRequest request,
                        org.apache.jetspeed.portlet.PortletResponse response)
                 throws org.apache.jetspeed.portlet.PortletException,
                        java.io.IOException
This method is called by container when administrator clicks on the configure button on toolbar.

Overrides:
doConfigure in class org.apache.jetspeed.portlet.PortletAdapter
Parameters:
request - , response
Throws:
org.apache.jetspeed.portlet.PortletException
java.io.IOException

actionPerformed

public void actionPerformed(org.apache.jetspeed.portlet.event.ActionEvent event)
                     throws org.apache.jetspeed.portlet.PortletException
Handles all action events

Specified by:
actionPerformed in interface org.apache.jetspeed.portlet.event.ActionListener
Throws:
org.apache.jetspeed.portlet.PortletException

updateSelectedItems

public void updateSelectedItems(org.apache.jetspeed.portlet.PortletRequest request,
                                MassUpdateBean massUpdateBean)
                         throws java.lang.Exception
Method saves all changes done by all the displayed attributes of Item. It generates the formatted comma separated csv file to send it to wpc. All attributes are listed in one row for each item starting with primary key.

Parameters:
request -
massUpdateBean -
Throws:
java.lang.Exception

deleteSelectedItems

public void deleteSelectedItems(org.apache.jetspeed.portlet.PortletRequest request,
                                MassUpdateBean massUpdateBean)
                         throws java.lang.Exception
Method used for deleting selected Items.It deletes all the checked Items in Mass Edit Portlet

Parameters:
request -
massUpdateBean -
Throws:
java.lang.Exception

orderAttributes

protected java.util.List orderAttributes(java.util.List itemAttrList,
                                         int selectedAttributeSize)
Ordrs the list according to user selection