Package org.sakaiproject.portal.api
Interface PortalHandler
-
public interface PortalHandlerTools 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$
- Author:
- ieb
-
-
Field Summary
Fields Modifier and Type Field Description static intABORTReturn codes, stop processing immediatelystatic intENDStop processingstatic intNEXTtry next handlerstatic intRESET_DONEstop processing and mark reset as done
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidderegister(Portal portal)deregister the the portal, invoked by the portalintdoGet(String[] parts, HttpServletRequest req, HttpServletResponse res, 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 codesintdoPost(String[] parts, HttpServletRequest req, HttpServletResponse res, Session session)perform a post but only accept it the handler accepts a post.StringgetUrlFragment()get the fragment of the URL that represents part[1] and is used to register the handler in the portal.voidregister(Portal portal, PortalService portalService, 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, HttpServletRequest req, HttpServletResponse res, 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:
IOExceptionServletExceptionToolHandlerExceptionPortalHandlerException
-
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, ServletContext servletContext)
register this handler with the portal, invoked by the portal- Parameters:
portal-portalService-servletContext-
-
doPost
int doPost(String[] parts, HttpServletRequest req, HttpServletResponse res, Session session) throws PortalHandlerException
perform a post but only accept it the handler accepts a post.- Parameters:
parts-req-res-session-- Returns:
- Throws:
PortalHandlerException
-
-