Package com.netscape.cmscore.profile
Class AbstractProfileSubsystem
- java.lang.Object
-
- com.netscape.cmscore.profile.AbstractProfileSubsystem
-
- All Implemented Interfaces:
ISubsystem
- Direct Known Subclasses:
ProfileSubsystem
public abstract class AbstractProfileSubsystem extends java.lang.Object implements ISubsystem
-
-
Field Summary
Fields Modifier and Type Field Description protected IConfigStore
mConfig
protected java.util.Hashtable<java.lang.String,java.lang.String>
mProfileClassIds
protected java.util.LinkedHashMap<java.lang.String,Profile>
mProfiles
protected static java.lang.String
PROP_CHECK_OWNER
protected static java.lang.String
PROP_ENABLE
protected static java.lang.String
PROP_ENABLE_BY
-
Constructor Summary
Constructors Constructor Description AbstractProfileSubsystem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkOwner()
Checks if owner id should be enforced during profile approval.protected void
commitConfigStore(java.lang.String id, IConfigStore cs)
void
commitProfile(java.lang.String id)
Commits a profile.void
disableProfile(java.lang.String id)
Disables a profile for execution.void
enableProfile(java.lang.String id, java.lang.String enableBy)
Enables a profile for execution.IConfigStore
getConfigStore()
Returns the root configuration storage of this system.java.lang.String
getId()
Retrieves the name of this subsystem.Profile
getProfile(java.lang.String id)
Retrieves a profile by id.IProfileAuthenticator
getProfileAuthenticator(Profile profile)
java.lang.String
getProfileClassId(java.lang.String id)
java.lang.String
getProfileEnableBy(java.lang.String id)
java.util.Enumeration<java.lang.String>
getProfileIds()
Retrieves a list of profile ids.boolean
isProfileEnable(java.lang.String id)
void
setId(java.lang.String id)
Sets specific to this subsystem.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.netscape.certsrv.base.ISubsystem
init, shutdown, startup
-
-
-
-
Field Detail
-
PROP_CHECK_OWNER
protected static final java.lang.String PROP_CHECK_OWNER
- See Also:
- Constant Field Values
-
PROP_ENABLE
protected static final java.lang.String PROP_ENABLE
- See Also:
- Constant Field Values
-
PROP_ENABLE_BY
protected static final java.lang.String PROP_ENABLE_BY
- See Also:
- Constant Field Values
-
mConfig
protected IConfigStore mConfig
-
mProfiles
protected java.util.LinkedHashMap<java.lang.String,Profile> mProfiles
-
mProfileClassIds
protected java.util.Hashtable<java.lang.String,java.lang.String> mProfileClassIds
-
-
Method Detail
-
getConfigStore
public IConfigStore getConfigStore()
Returns the root configuration storage of this system.- Specified by:
getConfigStore
in interfaceISubsystem
- Returns:
- configuration store of this subsystem
-
getId
public java.lang.String getId()
Retrieves the name of this subsystem.- Specified by:
getId
in interfaceISubsystem
- Returns:
- subsystem identifier
-
setId
public void setId(java.lang.String id) throws EBaseException
Sets specific to this subsystem.- Specified by:
setId
in interfaceISubsystem
- Parameters:
id
- subsystem identifier- Throws:
EBaseException
- failed to set id
-
isProfileEnable
public boolean isProfileEnable(java.lang.String id) throws EBaseException
- Throws:
EBaseException
-
getProfileEnableBy
public java.lang.String getProfileEnableBy(java.lang.String id) throws EBaseException
- Throws:
EBaseException
-
enableProfile
public void enableProfile(java.lang.String id, java.lang.String enableBy) throws EProfileException
Enables a profile for execution.- Throws:
EProfileException
-
getProfile
public Profile getProfile(java.lang.String id) throws EProfileException
Retrieves a profile by id.- Throws:
EProfileException
-
disableProfile
public void disableProfile(java.lang.String id) throws EProfileException
Disables a profile for execution.- Throws:
EProfileException
-
commitProfile
public void commitProfile(java.lang.String id) throws EProfileException
Commits a profile.- Throws:
EProfileException
-
commitConfigStore
protected void commitConfigStore(java.lang.String id, IConfigStore cs) throws EProfileException
- Throws:
EProfileException
-
getProfileClassId
public java.lang.String getProfileClassId(java.lang.String id)
-
getProfileAuthenticator
public IProfileAuthenticator getProfileAuthenticator(Profile profile) throws EBaseException
- Throws:
EBaseException
-
getProfileIds
public java.util.Enumeration<java.lang.String> getProfileIds()
Retrieves a list of profile ids. The return list is of type String.
-
checkOwner
public boolean checkOwner()
Checks if owner id should be enforced during profile approval.- Returns:
- true if approval should be checked
-
-