org.sakaiproject.portal.api
Interface PortalHandler


public interface PortalHandler

Tools that want to add handlers into the portal URL space may impliment this interface. The once injected into the portal the portal will invoke the register and deregister methods as part of the life cycle.

Since:
Sakai 2.4
Version:
$Rev: 59680 $
Author:
ieb

Field Summary
static int ABORT
          Return codes, stop processing immediately
static int END
          Stop processing
static int NEXT
          try next handler
static int RESET_DONE
          stop processing and mark reset as done
 
Method Summary
 void deregister(Portal portal)
          deregister the the portal, invoked by the portal
 int doGet(String[] parts, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, org.sakaiproject.tool.api.Session session)
          Perform a get, the method should inspect parts[] and other parameters to determin if it should perform the operation, returning one of the above codes
 int doPost(String[] parts, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, org.sakaiproject.tool.api.Session session)
          perform a post but only accept it the handler accepts a post.
 String getUrlFragment()
          get the fragment of the URL that represents part[1] and is used to register the handler in the portal.
 void register(Portal portal, PortalService portalService, javax.servlet.ServletContext servletContext)
          register this handler with the portal, invoked by the portal
 

Field Detail

ABORT

static final int ABORT
Return codes, stop processing immediately

See Also:
Constant Field Values

END

static final int END
Stop processing

See Also:
Constant Field Values

NEXT

static final int NEXT
try next handler

See Also:
Constant Field Values

RESET_DONE

static final int RESET_DONE
stop processing and mark reset as done

See Also:
Constant Field Values
Method Detail

doGet

int doGet(String[] parts,
          javax.servlet.http.HttpServletRequest req,
          javax.servlet.http.HttpServletResponse res,
          org.sakaiproject.tool.api.Session session)
          throws PortalHandlerException
Perform a get, the method should inspect parts[] and other parameters to determin if it should perform the operation, returning one of the above codes

Parameters:
parts -
req -
res -
session -
Returns:
Throws:
IOException
javax.servlet.ServletException
ToolHandlerException
PortalHandlerException

getUrlFragment

String getUrlFragment()
get the fragment of the URL that represents part[1] and is used to register the handler in the portal.

Returns:

deregister

void deregister(Portal portal)
deregister the the portal, invoked by the portal

Parameters:
portal -

register

void register(Portal portal,
              PortalService portalService,
              javax.servlet.ServletContext servletContext)
register this handler with the portal, invoked by the portal

Parameters:
portal -
portalService -
servletContext -

doPost

int doPost(String[] parts,
           javax.servlet.http.HttpServletRequest req,
           javax.servlet.http.HttpServletResponse res,
           org.sakaiproject.tool.api.Session session)
           throws PortalHandlerException
perform a post but only accept it the handler accepts a post.

Parameters:
parts -
req -
res -
session -
Returns:
Throws:
PortalHandlerException


Copyright © 2003-2012 Sakai Project. All Rights Reserved.