public final class PSConfig extends Object
Modifier and Type | Field and Description |
---|---|
protected static URI |
DEFAULT_API
The default URI for API access.
|
protected static String |
DEFAULT_PREFIX
The default PageSeeder site prefix.
|
protected static URI |
DEFAULT_WEBSITE
The default URI for user access.
|
Modifier and Type | Method and Description |
---|---|
StringBuilder |
buildAPIURL() |
StringBuilder |
buildHostURL() |
static void |
configure(PSConfig p)
Deprecated.
Use
setDefault(PSConfig) instead if no provider is available. |
URL |
getAPIBaseURL() |
String |
getAPIHost() |
int |
getAPIPort() |
String |
getAPIScheme() |
static PSConfig |
getDefault()
Returns the default configuration.
|
URL |
getDocumentBaseURL() |
String |
getHost() |
String |
getHostURL() |
int |
getPort() |
String |
getScheme() |
String |
getServletPrefix()
Deprecated.
|
String |
getSitePrefix() |
URL |
getWebsiteBaseURL() |
static PSConfig |
newInstance(Properties p)
For use by service providers to create a new PSConfig instance.
|
static PSConfig |
newInstance(String uri,
String api)
For use by service providers to create a new PSConfig instance.
|
static void |
setDefault(PSConfig p)
To configure the bridge manually.
|
static PSConfig |
singleton()
Deprecated.
Use
getDefault() instead. |
protected static final URI DEFAULT_WEBSITE
protected static final URI DEFAULT_API
protected static final String DEFAULT_PREFIX
public String getScheme()
public String getHost()
public int getPort()
public String getAPIScheme()
public String getAPIHost()
public int getAPIPort()
public String getSitePrefix()
@Deprecated public String getServletPrefix()
public URL getAPIBaseURL()
public URL getDocumentBaseURL()
public URL getWebsiteBaseURL()
public StringBuilder buildAPIURL()
public StringBuilder buildHostURL()
public String getHostURL()
public static void setDefault(PSConfig p)
p
- The properties to use to configure the bridge manually.public static PSConfig getDefault()
This method will attempt to use the SPI for providing a configuration.
@Deprecated public static PSConfig singleton()
getDefault()
instead.@Deprecated public static void configure(PSConfig p)
setDefault(PSConfig)
instead if no provider is available.p
- The properties to use to configure the bridge manually.public static PSConfig newInstance(Properties p)
p
- The set of properties to parseIllegalArgumentException
- If any or the properties yield to an malformed URLpublic static PSConfig newInstance(String uri, String api)
uri
- The URL to use as the base URI for PageSeeder URIsapi
- The URL to use as the base URI for API accessIllegalArgumentException
- If any or the properties yield to an malformed URLCopyright © 2016 Allette Systems. All rights reserved.