public class ActivationKeyHandler extends BaseHandler
VALID
Constructor and Description |
---|
ActivationKeyHandler() |
Modifier and Type | Method and Description |
---|---|
int |
addChildChannels(User loggedInUser,
java.lang.String key,
java.util.List childChannelLabels)
Add a child channel to an activation key.
|
int |
addConfigChannels(User loggedInUser,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> configChannelLabels,
boolean addToTop)
Given a list of activation keys and configuration channels,
this method inserts the configuration channels to either the top or
the bottom (whichever you specify) of an activation key's
configuration channels list.
|
int |
addEntitlements(User loggedInUser,
java.lang.String key,
java.util.List entitlements)
Add entitlements to an activation key.
|
int |
addPackageNames(User loggedInUser,
java.lang.String key,
java.util.List packageNames)
Deprecated.
being replaced by addPackages(string sessionKey, string key,
array[packages])
|
int |
addPackages(User loggedInUser,
java.lang.String key,
java.util.List<java.util.Map<java.lang.String,java.lang.String>> packages)
Add packages to an activation key.
|
int |
addServerGroups(User loggedInUser,
java.lang.String key,
java.util.List serverGroupIds)
Add server groups to an activation key.
|
int |
checkConfigDeployment(User loggedInUser,
java.lang.String key)
Check configuration file deployment status for the activation key specified.
|
java.lang.String |
clone(User loggedInUser,
java.lang.String key,
java.lang.String cloneDescription)
Clones activation key
|
java.lang.String |
create(User loggedInUser,
java.lang.String key,
java.lang.String description,
java.lang.String baseChannelLabel,
java.lang.Integer usageLimit,
java.util.List entitlements,
java.lang.Boolean universalDefault)
Creates a new activation key.
|
java.lang.String |
create(User loggedInUser,
java.lang.String key,
java.lang.String description,
java.lang.String baseChannelLabel,
java.util.List entitlements,
java.lang.Boolean universalDefault)
Creates a new activation key with unlimited usage..
|
int |
delete(User loggedInUser,
java.lang.String key)
Deletes an activation key.
|
int |
disableConfigDeployment(User loggedInUser,
java.lang.String key)
Disable configuration file deployment for the specified activation key
|
int |
enableConfigDeployment(User loggedInUser,
java.lang.String key)
Enable configuration file deployment for the specified activation key
|
ActivationKey |
getDetails(User loggedInUser,
java.lang.String key)
Return a struct of activation key details.
|
java.lang.Object[] |
listActivatedSystems(User loggedInUser,
java.lang.String key)
Return a list of systems activated with the activation key provided.
|
java.util.List<ActivationKey> |
listActivationKeys(User loggedInUser)
Return a list of activation key structs that are visible to the requesting user.
|
java.util.List |
listConfigChannels(User loggedInUser,
java.lang.String key)
Returns a list of config channel structs that are associated
to a given activation key.
|
int |
removeChildChannels(User loggedInUser,
java.lang.String key,
java.util.List childChannelLabels)
Remove a child channel from an activation key.
|
int |
removeConfigChannels(User loggedInUser,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> configChannelLabels)
removes selected channels from list of config channels provided
for a given list of activation keys.
|
int |
removeEntitlements(User loggedInUser,
java.lang.String key,
java.util.List entitlements)
Remove entitlements from an activation key.
|
int |
removePackageNames(User loggedInUser,
java.lang.String key,
java.util.List packageNames)
Deprecated.
being replaced by removePackages(string sessionKey, string key,
array[packages])
|
int |
removePackages(User loggedInUser,
java.lang.String key,
java.util.List<java.util.Map<java.lang.String,java.lang.String>> packages)
Remove packages from an activation key.
|
int |
removeServerGroups(User loggedInUser,
java.lang.String key,
java.util.List serverGroupIds)
Remove server groups from an activation key.
|
int |
setConfigChannels(User loggedInUser,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> configChannelLabels)
replaces the existing set of config channels for a given activation key.
|
int |
setDetails(User loggedInUser,
java.lang.String key,
java.util.Map details)
Set activation key details.
|
ensureConfigAdmin, ensureOrgAdmin, ensureOrgOrConfigAdmin, ensureSatAdmin, ensureSystemGroupAdmin, ensureUserRole, getLoggedInUser, invoke, providesAuthentication, setEntityAttribute, validateClientCertificate, validateEntitlements, validateMap, verifyOrgExists
public java.lang.String create(User loggedInUser, java.lang.String key, java.lang.String description, java.lang.String baseChannelLabel, java.lang.Integer usageLimit, java.util.List entitlements, java.lang.Boolean universalDefault) throws FaultException
loggedInUser
- The current userkey
- Key for the activation key, or empty string to have one
autogenerated.description
- A note or description.baseChannelLabel
- label of this key's base channel.usageLimit
- Usage limit for this key.entitlements
- List of string entitlement labels for the activation key.universalDefault
- Whether or not this key should be set as the
default for the user's organization.FaultException
- A FaultException is thrown if the loggedInUser
doesn't have permissions to create new activation keys.public java.lang.String clone(User loggedInUser, java.lang.String key, java.lang.String cloneDescription) throws FaultException
loggedInUser
- The current userkey
- Actication Key to be clonedcloneDescription
- Description for the new activation key.FaultException
- A FaultException is thrown if the loggedInUser
doesn't have permissions to create new activation keys.public java.lang.String create(User loggedInUser, java.lang.String key, java.lang.String description, java.lang.String baseChannelLabel, java.util.List entitlements, java.lang.Boolean universalDefault) throws FaultException
loggedInUser
- The current userkey
- Key for the activation key, or empty string to have one
autogenerated.description
- A note or description.baseChannelLabel
- label of this key's base channel.entitlements
- List of string entitlement labels for the activation key.universalDefault
- Whether or not this key should be set as the
default for the user's organization.FaultException
- A FaultException is thrown if the loggedInUser
doesn't have permissions to create new activation keys.public int delete(User loggedInUser, java.lang.String key)
loggedInUser
- The current userkey
- Key for the activation key, or empty string to have one
autogenerated.java.lang.IllegalArgumentException
- if the loggedInUser
doesn't have permissions to create new activation keys.public int setDetails(User loggedInUser, java.lang.String key, java.util.Map details) throws FaultException
loggedInUser
- The current userkey
- The activation key to be modifieddetails
- Map of new details. (contents optional)FaultException
- Thrown if the user does not have the activation
key admin role, if the base channel given does not exist, or if it
actually is not a base channel.public ActivationKey getDetails(User loggedInUser, java.lang.String key)
loggedInUser
- The current userkey
- The activation key to be modifiedpublic int addEntitlements(User loggedInUser, java.lang.String key, java.util.List entitlements)
loggedInUser
- The current userkey
- The activation key to act upon.entitlements
- List of string entitlement labels to be added.public int removeEntitlements(User loggedInUser, java.lang.String key, java.util.List entitlements)
loggedInUser
- The current userkey
- The activation key to act upon.entitlements
- List of string entitlement labels to be removed.public int addChildChannels(User loggedInUser, java.lang.String key, java.util.List childChannelLabels)
loggedInUser
- The current userkey
- The activation key to act uponchildChannelLabels
- List of child channel labels to be added to this
activation keypublic int removeChildChannels(User loggedInUser, java.lang.String key, java.util.List childChannelLabels)
loggedInUser
- The current userkey
- The activation key to act uponchildChannelLabels
- List of child channel labels to be removed
from this activation keypublic int addServerGroups(User loggedInUser, java.lang.String key, java.util.List serverGroupIds)
loggedInUser
- The current userkey
- The activation key to act upon.serverGroupIds
- List of server group IDs to be added to this activation key.public int removeServerGroups(User loggedInUser, java.lang.String key, java.util.List serverGroupIds)
loggedInUser
- The current userkey
- The activation key to act uponserverGroupIds
- List of server group IDs to be removed from this activation key@Deprecated public int addPackageNames(User loggedInUser, java.lang.String key, java.util.List packageNames)
loggedInUser
- The current userkey
- The activation key to act uponpackageNames
- List of package names to be added to this activation key@Deprecated public int removePackageNames(User loggedInUser, java.lang.String key, java.util.List packageNames)
loggedInUser
- The current userkey
- The activation key to act uponpackageNames
- List of package names to be removed from this activation keypublic int addPackages(User loggedInUser, java.lang.String key, java.util.List<java.util.Map<java.lang.String,java.lang.String>> packages)
loggedInUser
- The current userkey
- The activation key to act uponpackages
- List of packages to be added to this activation keypublic int removePackages(User loggedInUser, java.lang.String key, java.util.List<java.util.Map<java.lang.String,java.lang.String>> packages)
loggedInUser
- The current userkey
- The activation key to act uponpackages
- List of packages to be removed from this activation keypublic java.util.List<ActivationKey> listActivationKeys(User loggedInUser)
loggedInUser
- The current userpublic java.lang.Object[] listActivatedSystems(User loggedInUser, java.lang.String key)
loggedInUser
- The current userkey
- The activation keypublic java.util.List listConfigChannels(User loggedInUser, java.lang.String key)
loggedInUser
- The current userkey
- the activation keypublic int setConfigChannels(User loggedInUser, java.util.List<java.lang.String> keys, java.util.List<java.lang.String> configChannelLabels)
loggedInUser
- The current userkeys
- a lsit of activation keys.configChannelLabels
- sets channels labelspublic int addConfigChannels(User loggedInUser, java.util.List<java.lang.String> keys, java.util.List<java.lang.String> configChannelLabels, boolean addToTop)
loggedInUser
- The current userkeys
- the list of activation keys.configChannelLabels
- set of configuration channels labelsaddToTop
- if true inserts the configuration channels list to
the top of the configuration channels list of a serverpublic int removeConfigChannels(User loggedInUser, java.util.List<java.lang.String> keys, java.util.List<java.lang.String> configChannelLabels)
loggedInUser
- The current userkeys
- the list of activation key values.configChannelLabels
- sets channels labelspublic int enableConfigDeployment(User loggedInUser, java.lang.String key)
loggedInUser
- The current userkey
- the activation keypublic int disableConfigDeployment(User loggedInUser, java.lang.String key)
loggedInUser
- The current userkey
- the activation keypublic int checkConfigDeployment(User loggedInUser, java.lang.String key)
loggedInUser
- The current userkey
- the activation key