Class ExtensionBundle
- java.lang.Object
-
- com.unboundid.directory.sdk.common.types.ExtensionBundle
-
public class ExtensionBundle extends java.lang.Object
This class represents the physical state of a Ping Identity server extension bundle. All the operations are dependent upon the root directory that is specified in the constructor.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONFIG_PATH_RELATIVE
The relative path where the config files are.static java.lang.String
DOCUMENTATION_PATH_RELATIVE
The relative path where all the documentation files are.static java.lang.String
HISTORY_PATH_RELATIVE
The relative path where the config files are.static java.lang.String
LIBRARIES_PATH_RELATIVE
The relative path where all the libraries (jar files) are.static java.lang.String
MANIFEST_ATTR_SERVER_SDK_VERSION
The name of the jar file manifest attribute that provides the server SDK version number.static java.lang.String
MANIFEST_ATTR_SUPPORT_CONTACT
The name of the jar file manifest attribute that provides the extension bundle support contact.static java.lang.String
MANIFEST_ATTR_TITLE
The name of the jar file manifest attribute that provides the extension bundle name.static java.lang.String
MANIFEST_ATTR_URL
The name of the jar file manifest attribute that provides the extension bundle URL.static java.lang.String
MANIFEST_ATTR_VENDOR
The name of the jar file manifest attribute that provides the extension bundle vendor.static java.lang.String
MANIFEST_ATTR_VENDOR_ID
The name of the jar file manifest attribute that provides the extension bundle vendor ID.static java.lang.String
MANIFEST_ATTR_VERSION
The name of the jar file manifest attribute that provides the extension bundle version.static java.lang.String
UPDATE_LOG_NAME
File written to history/[timestamp]-[version] to document whatever modifications were made to the file system during an update.static java.lang.String
UPDATE_PATH
Path to the config/update directory where update base files are stored.
-
Constructor Summary
Constructors Constructor Description ExtensionBundle(java.io.File extensionBundleDir)
Creates a new instance from a root directory specified as a File.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
checkCompatibility(java.lang.String serverSDKVersionString)
Checks to make sure the SDK version specified in the extension JAR file is compatible with this server instance.boolean
containsClass(java.lang.Class clazz)
Checks if the given Class instance represents a class packaged in this extension bundle.java.lang.String
getBundleId()
Get the ID string that could be used to uniquely identify this bundle.java.io.File
getConfigDir()
Get the configuration directory for this extension bundle.java.io.File
getConfigUpdateDir()
Get the update directory for this extension bundle.java.io.File
getDocumentationDir()
Get the documentation directory for this extension bundle.java.io.File
getExtensionBundleDir()
Get the root directory of this extension bundle.java.io.File
getExtensionJarFile()
Get the extension jar file in the bundle.java.io.File
getHistoryDir()
Get the history directory for this extension bundle.java.io.File
getLibrariesDir()
Get the lib directory for this extension bundle.java.lang.String
getServerSDKVersion()
Get the server SDK version number the extensions where built against.java.lang.String
getSupportContact()
Get the support contact for this extension bundle.java.lang.String
getTitle()
Retrieves the title of this extension bundle.java.lang.String
getUrl()
Get the URL of the extension bundle.java.lang.String
getVendor()
Retrieves the vendor name of this extension bundle.java.lang.String
getVendorId()
Retrieves the vendor ID of this extension bundle.java.lang.String
getVersion()
Retrieves the version string of this extension bundle.
-
-
-
Field Detail
-
MANIFEST_ATTR_TITLE
public static final java.lang.String MANIFEST_ATTR_TITLE
The name of the jar file manifest attribute that provides the extension bundle name.- See Also:
- Constant Field Values
-
MANIFEST_ATTR_VERSION
public static final java.lang.String MANIFEST_ATTR_VERSION
The name of the jar file manifest attribute that provides the extension bundle version.- See Also:
- Constant Field Values
-
MANIFEST_ATTR_VENDOR
public static final java.lang.String MANIFEST_ATTR_VENDOR
The name of the jar file manifest attribute that provides the extension bundle vendor.- See Also:
- Constant Field Values
-
MANIFEST_ATTR_VENDOR_ID
public static final java.lang.String MANIFEST_ATTR_VENDOR_ID
The name of the jar file manifest attribute that provides the extension bundle vendor ID.- See Also:
- Constant Field Values
-
MANIFEST_ATTR_URL
public static final java.lang.String MANIFEST_ATTR_URL
The name of the jar file manifest attribute that provides the extension bundle URL.- See Also:
- Constant Field Values
-
MANIFEST_ATTR_SUPPORT_CONTACT
public static final java.lang.String MANIFEST_ATTR_SUPPORT_CONTACT
The name of the jar file manifest attribute that provides the extension bundle support contact.- See Also:
- Constant Field Values
-
MANIFEST_ATTR_SERVER_SDK_VERSION
public static final java.lang.String MANIFEST_ATTR_SERVER_SDK_VERSION
The name of the jar file manifest attribute that provides the server SDK version number.- See Also:
- Constant Field Values
-
CONFIG_PATH_RELATIVE
public static final java.lang.String CONFIG_PATH_RELATIVE
The relative path where the config files are.- See Also:
- Constant Field Values
-
LIBRARIES_PATH_RELATIVE
public static final java.lang.String LIBRARIES_PATH_RELATIVE
The relative path where all the libraries (jar files) are.- See Also:
- Constant Field Values
-
DOCUMENTATION_PATH_RELATIVE
public static final java.lang.String DOCUMENTATION_PATH_RELATIVE
The relative path where all the documentation files are.- See Also:
- Constant Field Values
-
HISTORY_PATH_RELATIVE
public static final java.lang.String HISTORY_PATH_RELATIVE
The relative path where the config files are.- See Also:
- Constant Field Values
-
UPDATE_PATH
public static final java.lang.String UPDATE_PATH
Path to the config/update directory where update base files are stored.- See Also:
- Constant Field Values
-
UPDATE_LOG_NAME
public static final java.lang.String UPDATE_LOG_NAME
File written to history/[timestamp]-[version] to document whatever modifications were made to the file system during an update.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ExtensionBundle
public ExtensionBundle(java.io.File extensionBundleDir) throws java.io.IOException, java.lang.IllegalArgumentException
Creates a new instance from a root directory specified as a File.- Parameters:
extensionBundleDir
- root directory of this extension bundle.- Throws:
java.io.IOException
- if a error occurs while opening the bundle.java.lang.IllegalArgumentException
- if a error occurs while loading the extension JAR.
-
-
Method Detail
-
getTitle
public java.lang.String getTitle()
Retrieves the title of this extension bundle.- Returns:
- The title of this extension bundle.
-
getVendor
public java.lang.String getVendor()
Retrieves the vendor name of this extension bundle.- Returns:
- The vendor name of this extension bundle.
-
getVendorId
public java.lang.String getVendorId()
Retrieves the vendor ID of this extension bundle.- Returns:
- The vendor ID of this extension bundle.
-
getVersion
public java.lang.String getVersion()
Retrieves the version string of this extension bundle.- Returns:
- The version string of this extension bundle.
-
getServerSDKVersion
public java.lang.String getServerSDKVersion()
Get the server SDK version number the extensions where built against.- Returns:
- The server SDK version number the extensions where built against.
-
getUrl
public java.lang.String getUrl()
Get the URL of the extension bundle.- Returns:
- The URL of the extension bundle.
-
getSupportContact
public java.lang.String getSupportContact()
Get the support contact for this extension bundle.- Returns:
- The support contact for this extension bundle.
-
getBundleId
public java.lang.String getBundleId()
Get the ID string that could be used to uniquely identify this bundle.- Returns:
- The ID string that could be used to uniquely identify this bundle.
-
getExtensionBundleDir
public java.io.File getExtensionBundleDir()
Get the root directory of this extension bundle.- Returns:
- The root directory of this extension bundle.
-
getExtensionJarFile
public java.io.File getExtensionJarFile()
Get the extension jar file in the bundle.- Returns:
- The extension jar file in the bundle.
-
getConfigDir
public java.io.File getConfigDir()
Get the configuration directory for this extension bundle.- Returns:
- The configuration directory for this extension bundle.
-
getConfigUpdateDir
public java.io.File getConfigUpdateDir()
Get the update directory for this extension bundle.- Returns:
- The update directory for this extension bundle.
-
getLibrariesDir
public java.io.File getLibrariesDir()
Get the lib directory for this extension bundle.- Returns:
- The lib directory for this extension bundle.
-
getDocumentationDir
public java.io.File getDocumentationDir()
Get the documentation directory for this extension bundle.- Returns:
- The documentation directory for this extension bundle.
-
getHistoryDir
public java.io.File getHistoryDir()
Get the history directory for this extension bundle.- Returns:
- The history directory for this extension bundle.
-
checkCompatibility
public static void checkCompatibility(java.lang.String serverSDKVersionString) throws java.lang.IllegalArgumentException
Checks to make sure the SDK version specified in the extension JAR file is compatible with this server instance.- Parameters:
serverSDKVersionString
- The server SDK version string.- Throws:
java.lang.IllegalArgumentException
- if the version string is invalid or not compatible.
-
containsClass
public boolean containsClass(java.lang.Class clazz)
Checks if the given Class instance represents a class packaged in this extension bundle.- Parameters:
clazz
- An class loaded into the server- Returns:
- true if the given class is included in this extension bundle
-
-