public static final class ProfileDataCollection.Profile extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ProfileDataCollection.Profile.Action
Management actions that can be performed with a
ProfileDataCollection.Profile object. |
Constructor and Description |
---|
ProfileDataCollection.Profile(String profileName)
Create a new profile import record.
|
ProfileDataCollection.Profile(String profileName,
ProfileDataCollection.Profile.Action action,
boolean failIfExists,
boolean failIfNotExists)
Create a new profile import record.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttributeValue(String attrName,
ProfileDataCollection.AttributeValue attrValue)
Add an attribute value to this profile.
|
boolean |
failIfExists()
Determine if the fail-if-exists flag has been set for CREATE actions.
|
boolean |
failIfNotExists()
Determine if the fail-if-not-exists flag has been set for REMOVE actions.
|
ProfileDataCollection.Profile.Action |
getAction()
Get the action to be applied to the profile.
|
String |
getName()
Get the name of the profile.
|
Map<String,ProfileDataCollection.AttributeValue> |
getValues()
Get the attribute names and values for this profile.
|
public ProfileDataCollection.Profile(String profileName)
This constructor is equivalent to new Profile(profileName, CREATE, false, false)
.
profileName
- the name of the profile. The value null
is
acceptable and indicates the profile table's default profile.public ProfileDataCollection.Profile(String profileName, ProfileDataCollection.Profile.Action action, boolean failIfExists, boolean failIfNotExists)
profileName
- the name of the profile. The value null
is
acceptable and indicates the profile table's default profile.action
- the import action. Must be one of the constants defined by the
ProfileDataCollection.Profile.Action
enumeration.failIfExists
- flag indicating if an exception should be thrown during
import if action == CREATE
and a profile with the name
specified by profileName
already exists.failIfNotExists
- flag indicating if an exception should be thrown during
import if action == REMOVE
and a profile with the name
specified by profileName
does not exist.IllegalArgumentException
- if an invalid action
is specified,
if failIfExists
is true
but action != CREATE
if failIfNotExists
is true
but action != remove
,
or if the default profile is selected for removal.public String getName()
public ProfileDataCollection.Profile.Action getAction()
public boolean failIfExists()
true
if the fail-if-exists flag has been set,
false
otherwise.public boolean failIfNotExists()
true
if the fail-if-not-exists flag has been set,
false
otherwise.public void addAttributeValue(String attrName, ProfileDataCollection.AttributeValue attrValue)
attrName
- the name of the attribute.attrValue
- the value of the attribute.IllegalStateException
- if the action for this profile is REMOVE.IllegalArgumentException
- if a value for the given attribute has
already been specified for this profile.public Map<String,ProfileDataCollection.AttributeValue> getValues()
attribute value
.