@ThreadSafe public final class PhotonPathMapper extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PhotonPathMapper.PathEntry |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containsAnyMapping() |
static String |
getAjaxServletPathOfApplicationID(String sApplicationID)
Get the ajax servlet path mapped to the specified application ID
|
static String |
getAjaxServletPathOfApplicationIDOrDefault(String sApplicationID)
Get the ajax servlet path mapped to the specified application ID or (if no
such application ID is present) return the path of the default application
ID
|
static String |
getAjaxServletPathOfDefaultApplicationID()
Get the ajax servlet path mapped to the default application ID
|
static String |
getAPIServletPathOfApplicationID(String sApplicationID)
Get the API servlet path mapped to the specified application ID
|
static String |
getAPIServletPathOfApplicationIDOrDefault(String sApplicationID)
Get the API servlet path mapped to the specified application ID or (if no
such application ID is present) return the path of the default application
ID
|
static String |
getAPIServletPathOfDefaultApplicationID()
Get the API servlet path mapped to the default application ID
|
static com.helger.commons.collection.ext.ICommonsMap<String,String> |
getApplicationIDToAjaxServletPathMap() |
static com.helger.commons.collection.ext.ICommonsMap<String,String> |
getApplicationIDToAPIServletPathMap() |
static com.helger.commons.collection.ext.ICommonsMap<String,String> |
getApplicationIDToApplicationServletPathMap() |
static com.helger.commons.collection.ext.ICommonsMap<String,PhotonPathMapper.PathEntry> |
getApplicationIDToPathEntryMap() |
static String |
getApplicationServletPathOfApplicationID(String sApplicationID)
Get the application servlet path mapped to the specified application ID
|
static String |
getApplicationServletPathOfApplicationIDOrDefault(String sApplicationID)
Get the application servlet path mapped to the specified application ID or
(if no such application ID is present) return the path of the default
application ID
|
static String |
getApplicationServletPathOfDefaultApplicationID()
Get the application servlet path mapped to the default application ID
|
static String |
getDefaultApplicationID() |
static com.helger.commons.state.EChange |
removeAllPathMappings()
Remove all contained path mappings (clearing).
|
static com.helger.commons.state.EChange |
removePathMapping(String sApplicationID)
Remove the all paths mapped to the specified application ID.
|
static void |
setAjaxServletPathMapping(String sApplicationID,
String sAjaxServletPath)
Set an ajax servlet path mapping.
|
static void |
setAPIServletPathMapping(String sApplicationID,
String sAPIServletPath)
Set an API servlet path mapping.
|
static void |
setApplicationServletPathMapping(String sApplicationID,
String sApplicationServletPath)
Set an application servlet path mapping.
|
static void |
setDefaultApplicationID(String sApplicationID)
Set the default application ID.
|
public static void setApplicationServletPathMapping(@Nonnull @Nonempty String sApplicationID, @Nonnull @Nonempty String sApplicationServletPath)
sApplicationID - Application ID to use. May neither be null nor empty.sApplicationServletPath - The path to use. May neither be null nor empty. Must
start with a "slash" but may not end with a slash. Valid example is
e.g. /publicpublic static void setAjaxServletPathMapping(@Nonnull @Nonempty String sApplicationID, @Nonnull @Nonempty String sAjaxServletPath)
sApplicationID - Application ID to use. May neither be null nor empty.sAjaxServletPath - The path to use. May neither be null nor empty. Must
start with a "slash" but may not end with a slash. Valid example is
e.g. /publicajaxpublic static void setAPIServletPathMapping(@Nonnull @Nonempty String sApplicationID, @Nonnull @Nonempty String sAPIServletPath)
sApplicationID - Application ID to use. May neither be null nor empty.sAPIServletPath - The path to use. May neither be null nor empty. Must
start with a "slash" but may not end with a slash. Valid example is
e.g. /publicapi@Nonnull public static com.helger.commons.state.EChange removePathMapping(@Nullable String sApplicationID)
null.sApplicationID - Application ID to be removed. May be null.EChange.CHANGED if the path was successfully removed@Nonnull public static com.helger.commons.state.EChange removeAllPathMappings()
EChange.CHANGED if at least one path was removed,
EChange.UNCHANGED otherwise.@Nullable public static String getApplicationServletPathOfApplicationID(@Nullable String sApplicationID)
sApplicationID - Application ID to check. May be null.null if no mapping was found. A path starting with a
slash but not ending with a slash otherwise.@Nullable public static String getAjaxServletPathOfApplicationID(@Nullable String sApplicationID)
sApplicationID - Application ID to check. May be null.null if no mapping was found. A path starting with a
slash but not ending with a slash otherwise.@Nullable public static String getAPIServletPathOfApplicationID(@Nullable String sApplicationID)
sApplicationID - Application ID to check. May be null.null if no mapping was found. A path starting with a
slash but not ending with a slash otherwise.public static boolean containsAnyMapping()
true if mappings are already defined,
false otherwise.@Nonnull @ReturnsMutableCopy public static com.helger.commons.collection.ext.ICommonsMap<String,PhotonPathMapper.PathEntry> getApplicationIDToPathEntryMap()
null.@Nonnull @ReturnsMutableCopy public static com.helger.commons.collection.ext.ICommonsMap<String,String> getApplicationIDToApplicationServletPathMap()
null.@Nonnull @ReturnsMutableCopy public static com.helger.commons.collection.ext.ICommonsMap<String,String> getApplicationIDToAjaxServletPathMap()
null.@Nonnull @ReturnsMutableCopy public static com.helger.commons.collection.ext.ICommonsMap<String,String> getApplicationIDToAPIServletPathMap()
null.public static void setDefaultApplicationID(@Nonnull @Nonempty String sApplicationID)
sApplicationID - The application ID to set as the default. May neither be
null nor empty.setApplicationServletPathMapping(String, String),
getDefaultApplicationID()@Nullable public static String getDefaultApplicationID()
null if not set.setDefaultApplicationID(String)@Nullable public static String getApplicationServletPathOfDefaultApplicationID()
null if no default application ID is set. A path
starting with a slash but not ending with a slash otherwise.getDefaultApplicationID()@Nullable public static String getAjaxServletPathOfDefaultApplicationID()
null if no default application ID is set. A path
starting with a slash but not ending with a slash otherwise.getDefaultApplicationID()@Nullable public static String getAPIServletPathOfDefaultApplicationID()
null if no default application ID is set. A path
starting with a slash but not ending with a slash otherwise.getDefaultApplicationID()@Nullable public static String getApplicationServletPathOfApplicationIDOrDefault(@Nullable String sApplicationID)
sApplicationID - Application ID to check. May be null.null if no mapping was found and no default path is
specified. A path starting with a slash but not ending with a slash
otherwise.getApplicationServletPathOfApplicationID(String),
getApplicationServletPathOfDefaultApplicationID()@Nullable public static String getAjaxServletPathOfApplicationIDOrDefault(@Nullable String sApplicationID)
sApplicationID - Application ID to check. May be null.null if no mapping was found and no default path is
specified. A path starting with a slash but not ending with a slash
otherwise.getAjaxServletPathOfApplicationID(String),
getAjaxServletPathOfDefaultApplicationID()@Nullable public static String getAPIServletPathOfApplicationIDOrDefault(@Nullable String sApplicationID)
sApplicationID - Application ID to check. May be null.null if no mapping was found and no default path is
specified. A path starting with a slash but not ending with a slash
otherwise.getAPIServletPathOfApplicationID(String),
getAPIServletPathOfDefaultApplicationID()Copyright © 2014–2017 Philip Helger. All rights reserved.