com.ibm.portal.spa.data
Class SpaURI

java.lang.Object
  extended by com.ibm.portal.resolver.uri.BaseURI
      extended by com.ibm.portal.spa.data.SpaURI
All Implemented Interfaces:
Identifiable, Constants

public class SpaURI
extends BaseURI
implements Constants, Identifiable

URI that allows to address static resources inside a ZIP file that is associated to a static page

 spa:/<OID>/somepath
 

Since:
6.1.0

Field Summary
 
Fields inherited from class com.ibm.portal.resolver.uri.BaseURI
LOG_LEVEL
 
Fields inherited from interface com.ibm.portal.spa.data.Constants
KEY_LOCALE, SCHEME_SPA_URI, SCHEME_ZIP_URI
 
Fields inherited from interface com.ibm.portal.resolver.uri.Constants
ESCAPE_CHAR, ESCAPE_STRG
 
Constructor Summary
com.ibm.portal.identification.Identification)">SpaURI(java.net.URI uri, Identification idSvc)
          Parses the URI and provides the parts of this URI as objects
 
Method Summary
 java.lang.String getFileName()
          Filename of the file inside the ZIP that is addressed by this URI
 java.lang.String getMarkup()
           
 ObjectID getObjectID()
          Returns the object ID of the resource that implements the Identifiable interface.
static java.net.URI com.ibm.portal.identification.Identification)">newInstance(ObjectID pageID, java.lang.String markup, Identification idSvc)
          Deprecated. use com.ibm.portal.identification.Identification, com.ibm.portal.resolver.service.PocService)">newInstance(ObjectID, String, Identification, PocService) instead
static java.net.URI com.ibm.portal.identification.Identification, com.ibm.portal.resolver.service.PocService)">newInstance(ObjectID pageID, java.lang.String markup, Identification idSvc, PocService pocService)
          Creates a URI that only addresses the static page, but not a resource inside this page
static java.net.URI com.ibm.portal.identification.Identification)">newInstance(ObjectID pageID, java.lang.String markup, java.lang.String fileName, Identification idSvc)
          Deprecated. use com.ibm.portal.identification.Identification, com.ibm.portal.resolver.service.PocService)">newInstance(ObjectID, String, String, Identification, PocService) instead
static java.net.URI com.ibm.portal.identification.Identification, com.ibm.portal.resolver.service.PocService)">newInstance(ObjectID pageID, java.lang.String markup, java.lang.String fileName, Identification idSvc, PocService pocService)
          Constructs a new URI based on the pageID and the filename inside the ZIP file.
static java.net.URI newInstance(java.lang.String pageName, java.lang.String markup)
          Deprecated. use newInstance(String, String, PocService) instead
static java.net.URI newInstance(java.lang.String pageName, java.lang.String markup, PocService pocService)
          Creates a URI that only addresses the static page, but not a resource inside this page
static java.net.URI newInstance(java.lang.String pageName, java.lang.String markup, java.lang.String fileName)
          Deprecated. use newInstance(String, String, String, PocService) instead
static java.net.URI newInstance(java.lang.String pageName, java.lang.String markup, java.lang.String fileName, PocService pocService)
          Constructs a new URI based on the serialized form of the page and the filename inside the ZIP file.
 
Methods inherited from class com.ibm.portal.resolver.uri.BaseURI
createURI, createURI, java.io.StringWriter)">decode, decode, decode, java.io.Writer, java.lang.String)">encode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail
com.ibm.portal.identification.Identification)">

SpaURI

public SpaURI(java.net.URI uri,
              Identification idSvc)
       throws java.net.MalformedURLException,
              SerializationException
Parses the URI and provides the parts of this URI as objects

Parameters:
uri - the SPA URI
idSvc - the identification service
Throws:
java.net.MalformedURLException
SerializationException
Method Detail
com.ibm.portal.identification.Identification)">

newInstance

@Deprecated
public static java.net.URI newInstance(ObjectID pageID,
                                                  java.lang.String markup,
                                                  Identification idSvc)
                                throws SerializationException
Deprecated. use com.ibm.portal.identification.Identification, com.ibm.portal.resolver.service.PocService)">newInstance(ObjectID, String, Identification, PocService) instead

Creates a URI that only addresses the static page, but not a resource inside this page

Parameters:
pageID - the ObjectID of the page
markup - the markup name
idSvc - the identification service used to serialize the ID
Returns:
the SPA URI
Throws:
SerializationException

com.ibm.portal.identification.Identification, com.ibm.portal.resolver.service.PocService)">

newInstance

public static java.net.URI newInstance(ObjectID pageID,
                                       java.lang.String markup,
                                       Identification idSvc,
                                       PocService pocService)
                                throws SerializationException,
                                       java.net.URISyntaxException
Creates a URI that only addresses the static page, but not a resource inside this page

Parameters:
pageID - the ObjectID of the page
markup - the markup name
idSvc - the identification service used to serialize the ID
Returns:
the SPA URI
Throws:
SerializationException
java.net.URISyntaxException

com.ibm.portal.identification.Identification)">

newInstance

@Deprecated
public static java.net.URI newInstance(ObjectID pageID,
                                                  java.lang.String markup,
                                                  java.lang.String fileName,
                                                  Identification idSvc)
                                throws SerializationException
Deprecated. use com.ibm.portal.identification.Identification, com.ibm.portal.resolver.service.PocService)">newInstance(ObjectID, String, String, Identification, PocService) instead

Constructs a new URI based on the pageID and the filename inside the ZIP file.

Parameters:
pageID - the ObjectID of the page
markup - the markup name
fileName - the filename inside the ZIP
idSvc - the identification service used to serialize the ID
Returns:
the SPA URI
Throws:
SerializationException

com.ibm.portal.identification.Identification, com.ibm.portal.resolver.service.PocService)">

newInstance

public static java.net.URI newInstance(ObjectID pageID,
                                       java.lang.String markup,
                                       java.lang.String fileName,
                                       Identification idSvc,
                                       PocService pocService)
                                throws SerializationException,
                                       java.net.URISyntaxException
Constructs a new URI based on the pageID and the filename inside the ZIP file.

Parameters:
pageID - the ObjectID of the page
markup - the markup name
fileName - the filename inside the ZIP
idSvc - the identification service used to serialize the ID
Returns:
the SPA URI
Throws:
SerializationException
java.net.URISyntaxException

newInstance

@Deprecated
public static java.net.URI newInstance(java.lang.String pageName,
                                                  java.lang.String markup)
Deprecated. use newInstance(String, String, PocService) instead

Creates a URI that only addresses the static page, but not a resource inside this page

Parameters:
pageName - the page name (OID or unique name
markup - the markup name
Returns:
the URI

newInstance

public static java.net.URI newInstance(java.lang.String pageName,
                                       java.lang.String markup,
                                       PocService pocService)
                                throws java.net.URISyntaxException
Creates a URI that only addresses the static page, but not a resource inside this page

Parameters:
pageName - the page name (OID or unique name
markup - the markup name
Returns:
the URI
Throws:
java.net.URISyntaxException

newInstance

@Deprecated
public static java.net.URI newInstance(java.lang.String pageName,
                                                  java.lang.String markup,
                                                  java.lang.String fileName)
Deprecated. use newInstance(String, String, String, PocService) instead

Constructs a new URI based on the serialized form of the page and the filename inside the ZIP file.

Parameters:
pageName - serialized form of the page ID
markup - the markup name
fileName - the filename inside the ZIP file
Returns:
the SPA URI

newInstance

public static java.net.URI newInstance(java.lang.String pageName,
                                       java.lang.String markup,
                                       java.lang.String fileName,
                                       PocService pocService)
                                throws java.net.URISyntaxException
Constructs a new URI based on the serialized form of the page and the filename inside the ZIP file.

Parameters:
pageName - serialized form of the page ID
markup - the markup name
fileName - the filename inside the ZIP file
Returns:
the SPA URI
Throws:
java.net.URISyntaxException

getFileName

public java.lang.String getFileName()
Filename of the file inside the ZIP that is addressed by this URI

Returns:
the fileName

getMarkup

public java.lang.String getMarkup()
Returns:
the markup

getObjectID

public ObjectID getObjectID()
Description copied from interface: Identifiable
Returns the object ID of the resource that implements the Identifiable interface.

Specified by:
getObjectID in interface Identifiable
Returns:
the ObjectID of this resource, this can never be null