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 Summary
Fields Modifier and Type Field Description static String
DEVELOPMENT_VERSION
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addAuthModule(Class<?> moduleClass, InputStream inputStream)
Add a new Auth Module - also registers the SMS service.void
addNodeToRegistry(Class<?> nodeClass)
Adds the node to the registry of nodes.void
addSmsService(InputStream inputStream)
Add a new SMS service.void
installAuthNode(Class<?> nodeClass)
Installs a new authentication node.void
installIdRepo(Class<?> idRepoConfig)
Installs a new identity repository.void
installSecretsStoreType(Class<?> secretsStoreClass)
Installs and registers a secrets store type for use in obtaining secrets for services.void
installService(Class<?> serviceClass)
Installs an annotated service class.void
registerAuthNode(Class<?> nodeClass)
Deprecated.UseinstallAuthNode(Class)
andstartAuthNode(Class)
as appropriate.void
registerService(Class<?> serviceClass)
Deprecated.UseinstallService(Class)
andstartService(Class)
as appropriate.Path
resolveInstallationPath(String path)
Resolves a file path relative to the AM installation location.void
startAuthNode(Class<?> nodeClass)
Starts an existing authentication node.void
startIdRepo(Class<?> idRepoConfig)
Starts an existing identity repository.void
startSecretsStoreType(Class<?> secretsStoreClass)
Installs and registers a secrets store type for use in obtaining secrets for services.void
startService(Class<?> serviceClass)
Installs an annotated service class.void
uninstallAuthNode(Class<?> nodeClass)
Uninstalls and de-registers an authentication node for execution by trees.void
uninstallIdRepo(Class<?> idRepoConfig)
Uninstalls and de-registers an identity repository.void
upgradeAuthNode(Class<?> nodeClass)
Upgrades an existing authentication node.void
upgradeIdRepo(Class<?> idRepoConfig)
Upgrades an existing identity repository.
-
-
-
Field Detail
-
DEVELOPMENT_VERSION
static final String DEVELOPMENT_VERSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
addSmsService
void 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.
-
addAuthModule
void addAuthModule(Class<?> moduleClass, InputStream inputStream) throws PluginException
Add a new Auth Module - also registers the SMS service.- Parameters:
moduleClass
- Thecom.sun.identity.authentication.spi.AMLoginModule
class.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
- Theorg.forgerock.openam.auth.node.api.Node
class.- Throws:
PluginException
- If the auth node does not implement theNode
interface, or cannot be registered for some other reason.IllegalArgumentException
- If the nodeClass is not annotated correctly.
-
installSecretsStoreType
void 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
- Theorg.forgerock.openam.annotations.sm.Config
-annotated class.- Throws:
PluginException
- If the class cannot be registered for some reason.
-
startSecretsStoreType
void 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
- Theorg.forgerock.openam.annotations.sm.Config
-annotated class.- Throws:
PluginException
- If the class cannot be registered for some reason.
-
uninstallAuthNode
void uninstallAuthNode(Class<?> nodeClass) throws PluginException
Uninstalls and de-registers an authentication node for execution by trees.- Parameters:
nodeClass
- Theorg.forgerock.openam.auth.node.api.Node
class.- Throws:
PluginException
- If the auth node does not implement theNode
interface, 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
- Theorg.forgerock.openam.annotations.sm.Config
-annotated class.- Throws:
PluginException
- If the class cannot be registered for some reason.
-
installService
void installService(Class<?> serviceClass) throws PluginException
Installs an annotated service class.This method should be called only on plugin installation.
- Parameters:
serviceClass
- Theorg.forgerock.openam.annotations.sm.Config
-annotated class.- Throws:
PluginException
- If the class cannot be installed for some reason.
-
startService
void startService(Class<?> serviceClass) throws PluginException
Installs an annotated service class.This method should be called on plugin startup.
- Parameters:
serviceClass
- Theorg.forgerock.openam.annotations.sm.Config
-annotated class.- Throws:
PluginException
- If the class cannot be started for some reason.
-
upgradeAuthNode
void 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
- Theorg.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.
-
installAuthNode
void 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
- Theorg.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.
-
addNodeToRegistry
void addNodeToRegistry(Class<?> nodeClass)
Adds the node to the registry of nodes.- Parameters:
nodeClass
- Theorg.forgerock.openam.annotations.sm.Config
-annotated class.- Throws:
IllegalArgumentException
- If the nodeClass is not annotated correctly.
-
startAuthNode
void 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
- Theorg.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.
-
installIdRepo
void 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
- Theorg.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.
-
upgradeIdRepo
void 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
- Theorg.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.
-
startIdRepo
void 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
- Theorg.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.
-
uninstallIdRepo
void uninstallIdRepo(Class<?> idRepoConfig) throws PluginException
Uninstalls and de-registers an identity repository.- Parameters:
idRepoConfig
- Theorg.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.
-
resolveInstallationPath
Path resolveInstallationPath(String path)
Resolves a file path relative to the AM installation location. For example, if AM is installed into/home/forgerock/am
and the pathfoo/bar
is 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.
-
-