Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.portal.provider.v1.http
Class UrlServicesUtils

    java.lang.Object
      |
      +--oracle.portal.provider.v1.http.UrlServicesUtils

public class UrlServicesUtils
extends java.lang.Object

URLServicesUtils class contains metadata which is common across modules. It handles logging specific issues such as logging different messages with respect to debuglevel parameter specified.

Field Summary
`static java.lang.String` | `BASIC_AUTHENTICATION`
`static int` | `BASIC_LOGGING`
`static java.lang.String` | `CONTENT_TYPE_HEADER_FIELD`
`static java.lang.String` | `DEFAULT_CHARACTER_ENCODING`
`static java.lang.String` | `DEFAULT_IANA_ENCODING`
`static java.lang.String` | `EXTERNAL`
`static java.lang.String` | `EXTERNAL_APP`
`static java.lang.String` | `FALSE`
`static java.lang.String` | `FORWARD_SLASH`
`static int` | `HIGHER_LOGGING`
`static java.lang.String` | `HREF_LOWERCASE`
`static java.lang.String` | `HREF_UPPERCASE`
`static java.lang.String` | `HTML`
`static int` | `HTML_CONTENTS_LOGGING`
`static int` | `MAXCOOKIES`
`static java.lang.String` | `PAGE_URL`
`static java.lang.String` | `PUBLIC_PORTLET`
`static java.lang.String` | `REGISTERED_AUTHTYPE`
`static java.lang.String` | `REGISTERED_FLAG`
`static java.lang.String` | `TABLE_BACKGROUND_COLOR`
`static java.lang.String` | `TABLE_TAG_END`
`static java.lang.String` | `TABLE_TAG_START`
`static java.lang.String` | `TRUE`
`static int` | `XHTML_CONTENTS_LOGGING`
`static java.lang.String` | `XML`

Constructor Summary
`UrlServicesUtils()`

Method Summary
`static java.lang.String` | `convertIANAtoJava(java.lang.String IANAName)` Convert an character set string in IANA, or IANA alias, form into a Java name suitable for the Java-based CS-conversion rules.
`static java.lang.StringBuffer` | `convertStreamToStringBuffer(java.io.InputStream urlStream, java.lang.String encoding, oracle.portal.provider.v1.Provider provider, int debugLevel)` Helper method which returns the string contents out of input stream.
`static java.lang.String` | `getCharsetFromContentType(java.lang.String contentType)` Extract the character set name from a standard HTTP Content-Type header String.
`static java.lang.String` | `getEncodingFromContentType(java.lang.String contentType)` Convert an character set string in IANA, or IANA alias, form into a Java name suitable for the Java-based CS-conversion rules.
`static java.lang.String` | `getQualifiedParameter(oracle.portal.provider.v1.PortletRenderRequest pr, java.lang.String param)` Method used return qualified portlet parameter value of the corresponding unqualified paramter.
`static java.lang.String` | `hashString(java.lang.String str)` Method converts a hashes a string to another string which contains the sum of individual character integer values.
`protected static void` | `logMessage(oracle.portal.provider.v1.Provider p, java.lang.String msg, java.lang.Exception e, int msgDebugLevel)` Method for logging exceptions and their description into Web Server's log file.
`protected static void` | `logMessage(oracle.portal.provider.v1.Provider p, java.lang.String msg, int msgDebugLevel)`
`protected static void` | `logMessage(oracle.portal.provider.v1.Provider p, java.lang.String msg, int msgDebugLevel, int type)` Method for logging exceptions and their description into Web.
`static java.lang.String` | `portletParameter(oracle.portal.provider.v1.PortletRenderRequest pr, java.lang.String param)` Method used to make qualified portlet parameter based on its instance name.
`protected static int` | `readDebugLevel(oracle.portal.provider.v1.PortletRenderRequest pr)`
`protected static int` | `readDebugLevel(oracle.portal.provider.v1.Provider p)`
`static java.lang.String` | `showPortletParameters(oracle.portal.provider.v1.PortletRenderRequest pr, boolean qualified)` Method to construct portlet parameter form based on paramters declared through provider.xml.

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

Field Detail

### MAXCOOKIES

    public static final int MAXCOOKIES

### EXTERNAL

    public static final java.lang.String EXTERNAL

### BASIC_AUTHENTICATION

    public static final java.lang.String BASIC_AUTHENTICATION

### CONTENT_TYPE_HEADER_FIELD

    public static final java.lang.String CONTENT_TYPE_HEADER_FIELD

### REGISTERED_FLAG

    public static final java.lang.String REGISTERED_FLAG

### REGISTERED_AUTHTYPE

    public static final java.lang.String REGISTERED_AUTHTYPE

### PUBLIC_PORTLET

    public static final java.lang.String PUBLIC_PORTLET

### HTML

    public static final java.lang.String HTML

### XML

    public static final java.lang.String XML

### TRUE

    public static final java.lang.String TRUE

### FALSE

    public static final java.lang.String FALSE

### HREF_LOWERCASE

    public static final java.lang.String HREF_LOWERCASE

### HREF_UPPERCASE

    public static final java.lang.String HREF_UPPERCASE

### FORWARD_SLASH

    public static final java.lang.String FORWARD_SLASH

### BASIC_LOGGING

    public static final int BASIC_LOGGING

### HIGHER_LOGGING

    public static final int HIGHER_LOGGING

### HTML_CONTENTS_LOGGING

    public static final int HTML_CONTENTS_LOGGING

### XHTML_CONTENTS_LOGGING

    public static final int XHTML_CONTENTS_LOGGING

### TABLE_TAG_START

    public static final java.lang.String TABLE_TAG_START

### TABLE_TAG_END

    public static final java.lang.String TABLE_TAG_END

### TABLE_BACKGROUND_COLOR

    public static final java.lang.String TABLE_BACKGROUND_COLOR

### DEFAULT_CHARACTER_ENCODING

    public static final java.lang.String DEFAULT_CHARACTER_ENCODING

### DEFAULT_IANA_ENCODING

    public static final java.lang.String DEFAULT_IANA_ENCODING

### PAGE_URL

    public static final java.lang.String PAGE_URL

### EXTERNAL_APP

    public static final java.lang.String EXTERNAL_APP

Constructor Detail

### UrlServicesUtils

    public UrlServicesUtils()

Method Detail

### logMessage

    protected static void logMessage(oracle.portal.provider.v1.Provider p,
                                     java.lang.String msg,
                                     int msgDebugLevel)

### logMessage

    protected static void logMessage(oracle.portal.provider.v1.Provider p,
                                     java.lang.String msg,
                                     int msgDebugLevel,
                                     int type)

  Method for logging exceptions and their description into Web. It works as follows ... There are four types of logging. They are : a) BASIC_LOGGING - where in only method entry and exit statements are written. b) HIGHER_LOGGING - which logs method execution flow statements. c) HTML_CONTENTS_LOGGING - which will write Html contents read from url to log file. d) XHTML_CONTENTS_LOGGING - Logging of XHTML contents from XmlFilter.
  Parameters:
    `p` - Provider object
    `msg` - Message to be logged
    `msgDebugLevel` - Debug level
    `type` - type of message (BASIC,HIGHER,HTML OR XHTML)

### logMessage

    protected static void logMessage(oracle.portal.provider.v1.Provider p,
                                     java.lang.String msg,
                                     java.lang.Exception e,
                                     int msgDebugLevel)

  Method for logging exceptions and their description into Web Server's log file.
  Parameters:
    `p` - Provider object
    `msg` - Message to be logged
    `e` - Exception thrown
    `msgDebugLevel` - Debug level

### readDebugLevel

    protected static int readDebugLevel(oracle.portal.provider.v1.PortletRenderRequest pr)

### readDebugLevel

    protected static int readDebugLevel(oracle.portal.provider.v1.Provider p)

### portletParameter

    public static java.lang.String portletParameter(oracle.portal.provider.v1.PortletRenderRequest pr,
                                                    java.lang.String param)

  Method used to make qualified portlet parameter based on its instance name.
  Parameters:
    `pr` - PortletRenderRequest to get portlet instance name
    `param` - parameter to be qualified.
  Returns:
    Qualified parameter name

### getQualifiedParameter

    public static java.lang.String getQualifiedParameter(oracle.portal.provider.v1.PortletRenderRequest pr,
                                                         java.lang.String param)

  Method used return qualified portlet parameter value of the corresponding unqualified paramter.
  Parameters:
    `pr` - PortletRenderRequest to get portlet instance name
    `param` - parameter to be qualified.
  Returns:
    Qualified parameter value

### showPortletParameters

    public static java.lang.String showPortletParameters(oracle.portal.provider.v1.PortletRenderRequest pr,
                                                         boolean qualified)

  Method to construct portlet parameter form based on paramters declared through provider.xml. The constructed HTML Content string is returned to the caller, which in turn renders in the portlet.
  Parameters:
    `pr` - PortletRenderRequest to get portlet instance name
    `qualified` - true/false based on if the paramters are qualified.
  Returns:
    String constructed parameter form content.

### hashString

    public static java.lang.String hashString(java.lang.String str)

  Method converts a hashes a string to another string which contains the sum of individual character integer values. This utility is used in making qualified portlet paramters.
  Parameters:
    `str` - string to be hashed.
  Returns:
    String hashed string.

### getCharsetFromContentType

    public static java.lang.String getCharsetFromContentType(java.lang.String contentType)

  Extract the character set name from a standard HTTP Content-Type header String. If none could be determined this function will return "ascii".
  Parameters:
    `contentType` - Standard HTTP Content-Type string.
  Returns:
    the Character set name contained in the string or "ascii".

### getEncodingFromContentType

    public static java.lang.String getEncodingFromContentType(java.lang.String contentType)
                                                       throws java.io.UnsupportedEncodingException

  Convert an character set string in IANA, or IANA alias, form into a Java name suitable for the Java-based CS-conversion rules.
  Parameters:
    `IANAName` - the name of the IANA character set.
  Returns:
    the Java-based equivalent.
  Throws:
    `java.io.UnsupportedEncodingException` - if there is no mapping.

### convertIANAtoJava

    public static java.lang.String convertIANAtoJava(java.lang.String IANAName)
                                              throws java.io.UnsupportedEncodingException

  Convert an character set string in IANA, or IANA alias, form into a Java name suitable for the Java-based CS-conversion rules.
  Parameters:
    `IANAName` - the name of the IANA character set.
  Returns:
    the Java-based equivalent.
  Throws:
    `java.io.UnsupportedEncodingException` - if there is no mapping.

### convertStreamToStringBuffer

    public static java.lang.StringBuffer convertStreamToStringBuffer(java.io.InputStream urlStream,
                                                                     java.lang.String encoding,
                                                                     oracle.portal.provider.v1.Provider provider,
                                                                     int debugLevel)

  Helper method which returns the string contents out of input stream.
  Parameters:
    `urlStream` - inputstream to be converted
    `encoding` - encoding to be applied to the inputstream
    `provider` - provider reference, to log messages.
    `debugLevel` - debug level to log messages.
  Returns:
    Inputstream converted into StringBuffer

Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD