Interface PluginTools
- 
 @SupportedAll public interface PluginTools A collection of simple tools for interacting with the SMS (Service Management Service). For more advanced usage you will need to use the SMS API directly. Seecom.sun.identity.sm.ServiceSchemaManager
- 
- 
Field SummaryFields Modifier and Type Field Description static StringDEVELOPMENT_VERSION
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddAuthModule(Class<?> moduleClass, InputStream inputStream)Add a new Auth Module - also registers the SMS service.voidaddNodeToRegistry(Class<?> nodeClass)Adds the node to the registry of nodes.voidaddSmsService(InputStream inputStream)Add a new SMS service.voidinstallAuthNode(Class<?> nodeClass)Installs a new authentication node.voidinstallIdRepo(Class<?> idRepoConfig)Installs a new identity repository.voidinstallSecretsStoreType(Class<?> secretsStoreClass)Installs and registers a secrets store type for use in obtaining secrets for services.voidinstallService(Class<?> serviceClass)Installs an annotated service class.voidregisterAuthNode(Class<?> nodeClass)Deprecated.UseinstallAuthNode(Class)andstartAuthNode(Class)as appropriate.voidregisterService(Class<?> serviceClass)Deprecated.UseinstallService(Class)andstartService(Class)as appropriate.PathresolveInstallationPath(String path)Resolves a file path relative to the AM installation location.voidstartAuthNode(Class<?> nodeClass)Starts an existing authentication node.voidstartIdRepo(Class<?> idRepoConfig)Starts an existing identity repository.voidstartSecretsStoreType(Class<?> secretsStoreClass)Installs and registers a secrets store type for use in obtaining secrets for services.voidstartService(Class<?> serviceClass)Installs an annotated service class.voiduninstallAuthNode(Class<?> nodeClass)Uninstalls and de-registers an authentication node for execution by trees.voiduninstallIdRepo(Class<?> idRepoConfig)Uninstalls and de-registers an identity repository.voidupgradeAuthNode(Class<?> nodeClass)Upgrades an existing authentication node.voidupgradeIdRepo(Class<?> idRepoConfig)Upgrades an existing identity repository.
 
- 
- 
- 
Field Detail- 
DEVELOPMENT_VERSIONstatic final String DEVELOPMENT_VERSION - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
addSmsServicevoid addSmsService(InputStream inputStream) throws PluginException Add a new SMS service.- Parameters:
- inputStream- A stream from which the service schema XML can be read.
- Throws:
- PluginException- If the service cannot be registered.
 
 - 
addAuthModulevoid addAuthModule(Class<?> moduleClass, InputStream inputStream) throws PluginException Add a new Auth Module - also registers the SMS service.- Parameters:
- moduleClass- The- com.sun.identity.authentication.spi.AMLoginModuleclass.
- inputStream- A stream from which the service schema XML can be read.
- Throws:
- PluginException- If either the auth module or the underlying service cannot be registered.
 
 - 
registerAuthNode@Deprecated void registerAuthNode(Class<?> nodeClass) throws PluginException Deprecated.UseinstallAuthNode(Class)andstartAuthNode(Class)as appropriate.Installs and registers an authentication node for execution by trees.This method should be called both on plugin installation and on plugin startup. - Parameters:
- nodeClass- The- org.forgerock.openam.auth.node.api.Nodeclass.
- Throws:
- PluginException- If the auth node does not implement the- Nodeinterface, or cannot be registered for some other reason.
- IllegalArgumentException- If the nodeClass is not annotated correctly.
 
 - 
installSecretsStoreTypevoid installSecretsStoreType(Class<?> secretsStoreClass) throws PluginException Installs and registers a secrets store type for use in obtaining secrets for services.This method should be called only plugin installation. - Parameters:
- secretsStoreClass- The- org.forgerock.openam.annotations.sm.Config-annotated class.
- Throws:
- PluginException- If the class cannot be registered for some reason.
 
 - 
startSecretsStoreTypevoid startSecretsStoreType(Class<?> secretsStoreClass) throws PluginException Installs and registers a secrets store type for use in obtaining secrets for services.This method should be called only on plugin startup. - Parameters:
- secretsStoreClass- The- org.forgerock.openam.annotations.sm.Config-annotated class.
- Throws:
- PluginException- If the class cannot be registered for some reason.
 
 - 
uninstallAuthNodevoid uninstallAuthNode(Class<?> nodeClass) throws PluginException Uninstalls and de-registers an authentication node for execution by trees.- Parameters:
- nodeClass- The- org.forgerock.openam.auth.node.api.Nodeclass.
- Throws:
- PluginException- If the auth node does not implement the- Nodeinterface, or cannot be de-registered for some other reason.
 
 - 
registerService@Deprecated void registerService(Class<?> serviceClass) throws PluginException Deprecated.UseinstallService(Class)andstartService(Class)as appropriate.Register an annotated service class.This method should be called both on plugin installation and on plugin startup. - Parameters:
- serviceClass- The- org.forgerock.openam.annotations.sm.Config-annotated class.
- Throws:
- PluginException- If the class cannot be registered for some reason.
 
 - 
installServicevoid installService(Class<?> serviceClass) throws PluginException Installs an annotated service class.This method should be called only on plugin installation. - Parameters:
- serviceClass- The- org.forgerock.openam.annotations.sm.Config-annotated class.
- Throws:
- PluginException- If the class cannot be installed for some reason.
 
 - 
startServicevoid startService(Class<?> serviceClass) throws PluginException Installs an annotated service class.This method should be called on plugin startup. - Parameters:
- serviceClass- The- org.forgerock.openam.annotations.sm.Config-annotated class.
- Throws:
- PluginException- If the class cannot be started for some reason.
 
 - 
upgradeAuthNodevoid upgradeAuthNode(Class<?> nodeClass) throws PluginException Upgrades an existing authentication node.This method should be called both on plugin installation and on plugin startup. - Parameters:
- nodeClass- The- org.forgerock.openam.annotations.sm.Config-annotated class.
- Throws:
- PluginException- If the class cannot be registered for some reason.
- IllegalArgumentException- If the nodeClass is not annotated correctly.
 
 - 
installAuthNodevoid installAuthNode(Class<?> nodeClass) throws PluginException Installs a new authentication node.This method should be called both on plugin installation and on plugin startup. - Parameters:
- nodeClass- The- org.forgerock.openam.annotations.sm.Config-annotated class.
- Throws:
- PluginException- If the class cannot be registered for some reason.
- IllegalArgumentException- If the nodeClass is not annotated correctly.
 
 - 
addNodeToRegistryvoid addNodeToRegistry(Class<?> nodeClass) Adds the node to the registry of nodes.- Parameters:
- nodeClass- The- org.forgerock.openam.annotations.sm.Config-annotated class.
- Throws:
- IllegalArgumentException- If the nodeClass is not annotated correctly.
 
 - 
startAuthNodevoid startAuthNode(Class<?> nodeClass) throws PluginException Starts an existing authentication node.This method should be called both on plugin installation and on plugin startup. - Parameters:
- nodeClass- The- org.forgerock.openam.annotations.sm.Config-annotated class.
- Throws:
- PluginException- If the class cannot be registered for some reason.
- IllegalArgumentException- If the nodeClass is not annotated correctly.
 
 - 
installIdRepovoid installIdRepo(Class<?> idRepoConfig) throws PluginException Installs a new identity repository.This method should be called both on plugin installation and on plugin startup. - Parameters:
- idRepoConfig- The- org.forgerock.openam.annotations.sm.IdRepoConfig-annotated class.
- Throws:
- PluginException- If the class cannot be registered for some reason.
- IllegalArgumentException- If the idRepoConfig is not annotated correctly.
 
 - 
upgradeIdRepovoid upgradeIdRepo(Class<?> idRepoConfig) throws PluginException Upgrades an existing identity repository.This method should be called both on plugin installation and on plugin startup. - Parameters:
- idRepoConfig- The- org.forgerock.openam.annotations.sm.IdRepoConfig-annotated class.
- Throws:
- PluginException- If the class cannot be registered for some reason.
- IllegalArgumentException- If the idRepoConfig is not annotated correctly.
 
 - 
startIdRepovoid startIdRepo(Class<?> idRepoConfig) throws PluginException Starts an existing identity repository.This method should be called both on plugin installation and on plugin startup. - Parameters:
- idRepoConfig- The- org.forgerock.openam.annotations.sm.IdRepoConfig-annotated class.
- Throws:
- PluginException- If the class cannot be registered for some reason.
- IllegalArgumentException- If the idRepoConfig is not annotated correctly.
 
 - 
uninstallIdRepovoid uninstallIdRepo(Class<?> idRepoConfig) throws PluginException Uninstalls and de-registers an identity repository.- Parameters:
- idRepoConfig- The- org.forgerock.openam.annotations.sm.IdRepoConfig-annotated class.
- Throws:
- PluginException- If the class cannot be unregistered for some reason.
- IllegalArgumentException- If the idRepoConfig is not annotated correctly.
 
 - 
resolveInstallationPathPath resolveInstallationPath(String path) Resolves a file path relative to the AM installation location. For example, if AM is installed into/home/forgerock/amand the pathfoo/baris passed then this will return the path object for/home/forgerock/am/foo/bar. No attempt is made to check if the path actually exists.Non-ForgeRock authored plugins should avoid relying on particular paths existing in the installation directory as these may change during version upgrades. - Parameters:
- path- the path to resolve relative to the AM installation directory.
- Returns:
- the resolved path.
 
 
- 
 
-