info.magnolia.ui.api.location
Class DefaultLocation

java.lang.Object
  extended by info.magnolia.ui.api.location.DefaultLocation
All Implemented Interfaces:
Location
Direct Known Subclasses:
BrowserLocation, DetailLocation, EditorLocation, PagesLocation

public class DefaultLocation
extends Object
implements Location

Default location implementation. Follows the pattern: appType:appName:subAppId;some/parameter.


Field Summary
 
Fields inherited from interface info.magnolia.ui.api.location.Location
LOCATION_TYPE_APP, LOCATION_TYPE_SHELL_APP, NOWHERE
 
Constructor Summary
DefaultLocation()
           
DefaultLocation(String fragment)
           
DefaultLocation(String appType, String appName)
           
DefaultLocation(String appType, String appName, String subAppId)
           
DefaultLocation(String appType, String appName, String subAppId, String parameter)
           
 
Method Summary
static String decodeFragment(String fragment)
          Decodes a fragment using the character encoding from the AggregationState.
static String decodeFragment(String fragment, String encoding)
          Decodes application/x-www-form-urlencoded fragment string using a specified encoding scheme if necessary.
 boolean equals(Object o)
           
static String extractAppName(String fragment)
           
static String extractAppType(String fragment)
           
static String extractParameter(String fragment)
           
static String extractSubAppId(String fragment)
           
 String getAppName()
           
 String getAppType()
           
 String getParameter()
           
 String getSubAppId()
           
 int hashCode()
           
 void setAppName(String appName)
           
 void setAppType(String appType)
           
 void setParameter(String parameter)
           
 void setSubAppId(String subAppId)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultLocation

public DefaultLocation()

DefaultLocation

public DefaultLocation(String appType,
                       String appName)

DefaultLocation

public DefaultLocation(String appType,
                       String appName,
                       String subAppId)

DefaultLocation

public DefaultLocation(String appType,
                       String appName,
                       String subAppId,
                       String parameter)

DefaultLocation

public DefaultLocation(String fragment)
Throws:
IllegalArgumentException - if the passed fragment is null or empty.
Method Detail

getAppType

public String getAppType()
Specified by:
getAppType in interface Location

getAppName

public String getAppName()
Specified by:
getAppName in interface Location

getSubAppId

public String getSubAppId()
Specified by:
getSubAppId in interface Location

getParameter

public String getParameter()
Specified by:
getParameter in interface Location

setParameter

public void setParameter(String parameter)

setSubAppId

public void setSubAppId(String subAppId)

setAppType

public void setAppType(String appType)

setAppName

public void setAppName(String appName)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

extractAppType

public static String extractAppType(String fragment)

extractAppName

public static String extractAppName(String fragment)

extractSubAppId

public static String extractSubAppId(String fragment)

extractParameter

public static String extractParameter(String fragment)

decodeFragment

public static String decodeFragment(String fragment,
                                    String encoding)
Decodes application/x-www-form-urlencoded fragment string using a specified encoding scheme if necessary.


decodeFragment

public static String decodeFragment(String fragment)
Decodes a fragment using the character encoding from the AggregationState.



Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.