Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasig.portal.car
Class CarResourceWorker

    java.lang.Object
      org.jasig.portal.car.CarResourceWorker

All Implemented Interfaces:
  IWorkerRequestProcessor

    public class CarResourceWorker

extends java.lang.Object
implements IWorkerRequestProcessor

Class to handle incoming portal requests with specified worker of "carrsrc". These request are for loading web elements out of an installed channel archive file. The form of the URL is the traditional UPFileSpec with a worker of "carrsrc" and a query parameter "carrsrc=". The resourcePath is the path to the resource from within the channel archive. For example: if a channel existed with the directory structure of "org/jasig/uportal/channels/email/" and within the email channel base directory there was an "images" directory containing "mailbox.gif" then the browser could access that image from the installed email channel archive via ".uP?carrsrc=org/jasig/ uportal/channels/email/images/mailbox.gif". See the ChannelRuntimeData.getBaseMediaURL methods from which channels can obtain the base URL dynamically without having to know if they are deployed as a traditional channel or as a channel archive.

Version:
  $Revision: 1.15 $
Author:
  Mark Boyd

Field Summary
`private static org.apache.commons.logging.Log` | `log`
`static java.lang.String` | `RCS_ID`
`private static CarResources` | `resources`

Constructor Summary
`CarResourceWorker()` Create a CarResourceWorker.

Method Summary
`private java.lang.String` | `getResourceName(javax.servlet.http.HttpServletRequest req)` Set the content type for the resource being served back.
`void` | `processWorkerDispatch(PortalControlStructures pcs)` Provides web access to channel resources stored in channel archive files housing channels if the channels were installed in the portal using a CAR.
`private void` | `setContentType(javax.servlet.http.HttpServletResponse res, java.lang.String resourceName)` Set the content type for the resource being served back.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    private static final org.apache.commons.logging.Log log

### resources

    private static CarResources resources

### RCS_ID

    public static final java.lang.String RCS_ID

See Also:
  Constant Field Values

Constructor Detail

### CarResourceWorker

    public CarResourceWorker()

  Create a CarResourceWorker.

Method Detail

### processWorkerDispatch

    public void processWorkerDispatch(PortalControlStructures pcs)
                               throws PortalException

  Provides web access to channel resources stored in channel archive files housing channels if the channels were installed in the portal using a CAR.

  Specified by:
    `processWorkerDispatch` in interface `IWorkerRequestProcessor`
  Parameters:
    `pcs` - a `PortalControlStructures` object
  Throws:
    `PortalException` - if an error occurs

### setContentType

    private void setContentType(javax.servlet.http.HttpServletResponse res,
                                java.lang.String resourceName)
                         throws PortalException

  Set the content type for the resource being served back. The ServletContext is used to obtain the proper mime-types. New/unknown types are defined in the deployment descriptor of the web application. In the future, channels could provide their own override file of types that they wish to support beyond the defaults.

  Throws:
    `PortalException`

### getResourceName

    private java.lang.String getResourceName(javax.servlet.http.HttpServletRequest req)
                                      throws PortalException

  Set the content type for the resource being served back.

  Throws:
    `PortalException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD