org.jasig.portal.channels.jsp
Class MediaResolver

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<String,Object>
          extended by org.jasig.portal.ChannelRuntimeData
              extended by org.jasig.portal.channels.jsp.MediaResolver
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>

Deprecated. All IChannel implementations should be migrated to portlets

@Deprecated
public class MediaResolver
extends ChannelRuntimeData

Handles resolving base media URL for jsp channel types since the controller class can't be used to tell if the channel was loaded via CAR or traditionally since it is extracted and residing in WEB-INF/classes so that it and its other objects can be accessible to JSPs deployed in the CAR. Therefore, its classloader won't be the CarClassloader.

Author:
Mark Boyd
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jasig.portal.ChannelRuntimeData
CAR_BASE, WEB_APP_BASE
 
Method Summary
 Object clone()
          Deprecated. Create a new instance of ourself Used by the CError channel
 String getBaseActionURL()
          Deprecated. Returns a baseActionURL - parameters of a request coming in on the baseActionURL will be placed into the ChannelRuntimeData object for channel's use.
 String getBaseActionURL(boolean idempotent)
          Deprecated. Returns a baseActionURL - parameters of a request coming in on the baseActionURL will be placed into the ChannelRuntimeData object for channel's use.
 String getBaseMediaURL(Class aChannelClass)
          Deprecated. Returns a media base appropriate for web-visible resources used by and deployed with the passed in class.
 String getBaseMediaURL(Object aChannelObject)
          Deprecated. Returns a media base appropriate for web-visible resources used by and deployed with the passed in object.
 String getBaseMediaURL(String resourcePath)
          Deprecated. Returns a media base appropriate for the resource path passed in.
 String getBaseWorkerURL(String worker)
          Deprecated. Returns the URL to invoke one of the workers specified in PortalSessionManager.
 String getBaseWorkerURL(String worker, boolean idempotent)
          Deprecated. Returns the URL to invoke one of the workers specified in PortalSessionManager.
 BrowserInfo getBrowserInfo()
          Deprecated. Provides information about a user-agent associated with the current request/response.
 String getFnameActionURL(String fname)
          Deprecated. Returns an idempotent URL that includes a single query parameter that targets a channel for focus mode by functional name.
 String getHttpRequestMethod()
          Deprecated. Get HTTP request method (i.e.
 String getKeywords()
          Deprecated. Returns the keywords
 Locale[] getLocales()
          Deprecated. Accessor method for ordered set of locales.
 Object getObjectParameter(String pName)
          Deprecated. Obtain an Object parameter value.
 Object[] getObjectParameterValues(String pName)
          Deprecated. Obtain all values for a given parameter as Objects.
 String getParameter(String pName)
          Deprecated. Get a parameter value.
 Enumeration getParameterNames()
          Deprecated. Get an enumeration of parameter names.
 Map getParameters()
          Deprecated. Get the parameters as a Map
 String[] getParameterValues(String pName)
          Deprecated. Obtain all values for a given parameter.
 String getRemoteAddress()
          Deprecated.  
 UPFileSpec getUPFile()
          Deprecated. Get the UPFileSpec
 boolean isRenderingAsRoot()
          Deprecated. Tells whether or not the channel is rendering as the root of the layout.
 boolean isTargeted()
          Deprecated. Tells whether or not the channel is currently targeted.
 void setBaseActionURL(String baseActionURL)
          Deprecated. Sets the base action URL.
 void setBrowserInfo(BrowserInfo bi)
          Deprecated. Setter method for browser info object.
 void setHttpRequestMethod(String method)
          Deprecated. Set the HTTP Request method.
 void setKeywords(String keywords)
          Deprecated. Sets the keywords
 void setLocales(Locale[] locales)
          Deprecated. Setter method for array of locales.
 void setParameter(String pName, String value)
          Deprecated. Establish a parameter name-value pair.
 void setParameters(Map params)
          Deprecated. A convenience method for setting a whole set of parameters at once.
 void setParametersSingleValued(Map params)
          Deprecated. A convenience method for setting a whole set of parameters at once.
 String[] setParameterValues(String pName, String[] values)
          Deprecated. Sets multi-valued parameter.
 void setRemoteAddress(String string)
          Deprecated.  
 void setRenderingAsRoot(boolean rar)
          Deprecated. Sets whether or not the channel is rendering as the root of the layout.
 void setTargeted(boolean targeted)
          Deprecated. Sets whether or not the channel is currently targeted.
 void setUPFile(UPFileSpec upfs)
          Deprecated. Set a UPFileSpec which will be used to produce baseActionURL and workerActionURL.
 String toString()
          Deprecated.  
 
Methods inherited from class org.jasig.portal.ChannelRuntimeData
getRequestType, setRequestType
 
Methods inherited from class java.util.Hashtable
clear, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getBaseMediaURL

public String getBaseMediaURL(Class aChannelClass)
                       throws PortalException
Deprecated. 
Description copied from class: ChannelRuntimeData
Returns a media base appropriate for web-visible resources used by and deployed with the passed in class. If the class of the passed in object was loaded from a CAR then a URL appropriate for accessing images in CARs is returned. Otherwise, a URL to the base media in the web application's document root is returned.

Overrides:
getBaseMediaURL in class ChannelRuntimeData
Throws:
PortalException

getBaseMediaURL

public String getBaseMediaURL(Object aChannelObject)
                       throws PortalException
Deprecated. 
Description copied from class: ChannelRuntimeData
Returns a media base appropriate for web-visible resources used by and deployed with the passed in object. If the class of the passed in object was loaded from a CAR then a URL appropriate for accessing images in CARs is returned. Otherwise, a URL to the base media in the web application's document root is returned.

Overrides:
getBaseMediaURL in class ChannelRuntimeData
Throws:
PortalException

getBaseMediaURL

public String getBaseMediaURL(String resourcePath)
                       throws PortalException
Deprecated. 
Description copied from class: ChannelRuntimeData
Returns a media base appropriate for the resource path passed in. The resource path is the path to the resource within its channel archive. (See org.jasig.portal.car.CarResources class for more information.) If the passed in resourcePath matches that of a resource loaded from CARs then this method returns a URL appropriate to obtain CAR deployed, web-visible resources. Otherwise it returns a URL to the traditional media path under the uPortal web application's document root.

Overrides:
getBaseMediaURL in class ChannelRuntimeData
Throws:
PortalException

clone

public Object clone()
Deprecated. 
Description copied from class: ChannelRuntimeData
Create a new instance of ourself Used by the CError channel

Overrides:
clone in class ChannelRuntimeData
Returns:
crd the cloned ChannelRuntimeData object

getBaseActionURL

public String getBaseActionURL()
Deprecated. 
Description copied from class: ChannelRuntimeData
Returns a baseActionURL - parameters of a request coming in on the baseActionURL will be placed into the ChannelRuntimeData object for channel's use.

Overrides:
getBaseActionURL in class ChannelRuntimeData
Returns:
a value of URL to which parameter sequences should be appended.

getBaseActionURL

public String getBaseActionURL(boolean idempotent)
Deprecated. 
Description copied from class: ChannelRuntimeData
Returns a baseActionURL - parameters of a request coming in on the baseActionURL will be placed into the ChannelRuntimeData object for channel's use.

Overrides:
getBaseActionURL in class ChannelRuntimeData
Parameters:
idempotent - a boolean value specifying if a given URL should be idepotent.
Returns:
a value of URL to which parameter sequences should be appended.

getBaseWorkerURL

public String getBaseWorkerURL(String worker,
                               boolean idempotent)
                        throws PortalException
Deprecated. 
Description copied from class: ChannelRuntimeData
Returns the URL to invoke one of the workers specified in PortalSessionManager. Typically the channel that is invoked with the worker will have to implement an interface specific for that worker.

Overrides:
getBaseWorkerURL in class ChannelRuntimeData
Parameters:
worker - - Worker string must be a UPFileSpec.xxx value.
idempotent - a boolean value sepcifying if a URL should be idempotent
Returns:
URL to invoke the worker.
Throws:
PortalException - if an error occurs

getBaseWorkerURL

public String getBaseWorkerURL(String worker)
Deprecated. 
Description copied from class: ChannelRuntimeData
Returns the URL to invoke one of the workers specified in PortalSessionManager. Typically the channel that is invoked with the worker will have to implement an interface specific for that worker.

Overrides:
getBaseWorkerURL in class ChannelRuntimeData
Parameters:
worker - - Worker string must be a UPFileSpec.xxx value.
Returns:
URL to invoke the worker.

getBrowserInfo

public BrowserInfo getBrowserInfo()
Deprecated. 
Description copied from class: ChannelRuntimeData
Provides information about a user-agent associated with the current request/response.

Overrides:
getBrowserInfo in class ChannelRuntimeData
Returns:
a BrowserInfo object ecapsulating various user-agent information.

getFnameActionURL

public String getFnameActionURL(String fname)
Deprecated. 
Description copied from class: ChannelRuntimeData
Returns an idempotent URL that includes a single query parameter that targets a channel for focus mode by functional name. Additional query parameters appended will be passed to the focused channel via the channel's ChannelRuntimeData object.

Overrides:
getFnameActionURL in class ChannelRuntimeData
Returns:
a value of URL including a single query parameter.

getHttpRequestMethod

public String getHttpRequestMethod()
Deprecated. 
Description copied from class: ChannelRuntimeData
Get HTTP request method (i.e. GET, POST)

Overrides:
getHttpRequestMethod in class ChannelRuntimeData
Returns:
a String value

getKeywords

public String getKeywords()
Deprecated. 
Description copied from class: ChannelRuntimeData
Returns the keywords

Overrides:
getKeywords in class ChannelRuntimeData
Returns:
a String of keywords, null if there were none

getLocales

public Locale[] getLocales()
Deprecated. 
Description copied from class: ChannelRuntimeData
Accessor method for ordered set of locales.

Overrides:
getLocales in class ChannelRuntimeData
Returns:
locales an ordered list of locales

getObjectParameter

public Object getObjectParameter(String pName)
Deprecated. 
Description copied from class: ChannelRuntimeData
Obtain an Object parameter value. If the parameter has multiple values, only the first value is returned.

Overrides:
getObjectParameter in class ChannelRuntimeData
Parameters:
pName - parameter name
Returns:
parameter value

getObjectParameterValues

public Object[] getObjectParameterValues(String pName)
Deprecated. 
Description copied from class: ChannelRuntimeData
Obtain all values for a given parameter as Objects.

Overrides:
getObjectParameterValues in class ChannelRuntimeData
Parameters:
pName - parameter name
Returns:
a vector of parameter Object[] values

getParameter

public String getParameter(String pName)
Deprecated. 
Description copied from class: ChannelRuntimeData
Get a parameter value. If the parameter has multiple values, only the first value is returned.

Overrides:
getParameter in class ChannelRuntimeData
Parameters:
pName - parameter name
Returns:
parameter value

getParameterNames

public Enumeration getParameterNames()
Deprecated. 
Description copied from class: ChannelRuntimeData
Get an enumeration of parameter names.

Overrides:
getParameterNames in class ChannelRuntimeData
Returns:
an Enumeration of parameter names.

getParameters

public Map getParameters()
Deprecated. 
Description copied from class: ChannelRuntimeData
Get the parameters as a Map

Overrides:
getParameters in class ChannelRuntimeData
Returns:
a Map of parameter name-value pairs

getParameterValues

public String[] getParameterValues(String pName)
Deprecated. 
Description copied from class: ChannelRuntimeData
Obtain all values for a given parameter.

Overrides:
getParameterValues in class ChannelRuntimeData
Parameters:
pName - parameter name
Returns:
an array of parameter string values

getRemoteAddress

public String getRemoteAddress()
Deprecated. 
Overrides:
getRemoteAddress in class ChannelRuntimeData
Returns:
the remote address

getUPFile

public UPFileSpec getUPFile()
Deprecated. 
Description copied from class: ChannelRuntimeData
Get the UPFileSpec

Overrides:
getUPFile in class ChannelRuntimeData
Returns:
channelUPFile the UPFileSpec

isRenderingAsRoot

public boolean isRenderingAsRoot()
Deprecated. 
Description copied from class: ChannelRuntimeData
Tells whether or not the channel is rendering as the root of the layout.

Overrides:
isRenderingAsRoot in class ChannelRuntimeData
Returns:
true if channel is rendering as the root, otherwise false

isTargeted

public boolean isTargeted()
Deprecated. 
Description copied from class: ChannelRuntimeData
Tells whether or not the channel is currently targeted. A channel is targeted if an incoming request specifies the channel's subscribe ID as the targeted node ID.

Overrides:
isTargeted in class ChannelRuntimeData
Returns:
true if channel is targeted, otherwise false

setBaseActionURL

public void setBaseActionURL(String baseActionURL)
Deprecated. 
Description copied from class: ChannelRuntimeData
Sets the base action URL. This was added back in for the benefit of web services. Not sure if it is going to stay this way.

Overrides:
setBaseActionURL in class ChannelRuntimeData
Parameters:
baseActionURL - the base action URL

setBrowserInfo

public void setBrowserInfo(BrowserInfo bi)
Deprecated. 
Description copied from class: ChannelRuntimeData
Setter method for browser info object.

Overrides:
setBrowserInfo in class ChannelRuntimeData
Parameters:
bi - a browser info associated with the current request

setHttpRequestMethod

public void setHttpRequestMethod(String method)
Deprecated. 
Description copied from class: ChannelRuntimeData
Set the HTTP Request method.

Overrides:
setHttpRequestMethod in class ChannelRuntimeData
Parameters:
method - a String value

setKeywords

public void setKeywords(String keywords)
Deprecated. 
Description copied from class: ChannelRuntimeData
Sets the keywords

Overrides:
setKeywords in class ChannelRuntimeData
Parameters:
keywords - a String of keywords

setLocales

public void setLocales(Locale[] locales)
Deprecated. 
Description copied from class: ChannelRuntimeData
Setter method for array of locales. A channel should make an effort to render itself according to the order of the locales in this array.

Overrides:
setLocales in class ChannelRuntimeData
Parameters:
locales - an ordered list of locales

setParameter

public void setParameter(String pName,
                         String value)
Deprecated. 
Description copied from class: ChannelRuntimeData
Establish a parameter name-value pair.

Overrides:
setParameter in class ChannelRuntimeData
Parameters:
pName - parameter name
value - parameter value

setParameters

public void setParameters(Map params)
Deprecated. 
Description copied from class: ChannelRuntimeData
A convenience method for setting a whole set of parameters at once. The values in the Map must be object arrays. If (name, value[]) is in the Map, then a future call to getParameter(name) will return value[0].

Overrides:
setParameters in class ChannelRuntimeData
Parameters:
params - a Map of parameter names to parameter value arrays.

setParametersSingleValued

public void setParametersSingleValued(Map params)
Deprecated. 
Description copied from class: ChannelRuntimeData
A convenience method for setting a whole set of parameters at once. The Map should contain name-value pairs. The name should be a String and the value should be either a String or a Part. If (name, value) is in the Map then a future call to getParameter(name) will return value.

Overrides:
setParametersSingleValued in class ChannelRuntimeData
Parameters:
params - a Map of parameter names to parameter value arrays.

setParameterValues

public String[] setParameterValues(String pName,
                                   String[] values)
Deprecated. 
Description copied from class: ChannelRuntimeData
Sets multi-valued parameter.

Overrides:
setParameterValues in class ChannelRuntimeData
Parameters:
pName - parameter name
values - an array of parameter values
Returns:
an array of parameter values

setRemoteAddress

public void setRemoteAddress(String string)
Deprecated. 
Overrides:
setRemoteAddress in class ChannelRuntimeData

setRenderingAsRoot

public void setRenderingAsRoot(boolean rar)
Deprecated. 
Description copied from class: ChannelRuntimeData
Sets whether or not the channel is rendering as the root of the layout.

Overrides:
setRenderingAsRoot in class ChannelRuntimeData
Parameters:
rar - true if channel is rendering as the root, otherwise false

setTargeted

public void setTargeted(boolean targeted)
Deprecated. 
Description copied from class: ChannelRuntimeData
Sets whether or not the channel is currently targeted. A channel is targeted if an incoming request specifies the channel's subscribe ID as the targeted node ID.

Overrides:
setTargeted in class ChannelRuntimeData
Parameters:
targeted - true if channel is targeted, otherwise false

setUPFile

public void setUPFile(UPFileSpec upfs)
Deprecated. 
Description copied from class: ChannelRuntimeData
Set a UPFileSpec which will be used to produce baseActionURL and workerActionURL.

Overrides:
setUPFile in class ChannelRuntimeData
Parameters:
upfs - the UPFileSpec

toString

public String toString()
Deprecated. 
Overrides:
toString in class ChannelRuntimeData


Copyright © 2010 Jasig. All Rights Reserved.