|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.object.PersistentObject
com.waveset.object.LoadConfig
An object that encapsulates options for bulk loading.
Since there are many options to the loading process, it is convenient to encapsulate all of them into an object. This simplifes the argument list to the loading method, and also allows us to store option sets in the repository for repeated use.
Some options specifiy similar things, and will be interpreted using a certain priority.
Role Assignment
There are several ways for a role to be assigned. The loader will consult the following options in this order:
Group Assignment
There are several ways for a group to be assigned. The loader will consult a set of options for group assignment similar to those for role assignment.
Nested Class Summary |
Nested classes inherited from class com.waveset.object.PersistentObject |
PersistentObject.Comparator, PersistentObject.InitialInstance |
Field Summary | |
static java.lang.String |
ATT_CORRELATION
|
static java.lang.String |
ATT_CORRELATION_REQ
|
static java.lang.String |
ATT_ESTIMATED_ACCOUNTS
|
static java.lang.String |
ATT_EVENT
|
static java.lang.String |
ATT_EXTERNAL
|
static java.lang.String |
ATT_GENERATE_PASSWORDS
|
static java.lang.String |
ATT_IGNORE_GROUPS
|
static java.lang.String |
ATT_IGNORE_PASSWORDS
|
static java.lang.String |
ATT_IGNORE_ROLES
|
static java.lang.String |
ATT_INFILE
|
static java.lang.String |
ATT_LOGFILE
|
static java.lang.String |
ATT_MAX_ERRORS
|
static java.lang.String |
ATT_OUTFILE
|
static java.lang.String |
ATT_PREFIX
|
static java.lang.String |
ATT_PROVISION
|
static java.lang.String |
ATT_REPROVISION
|
static java.lang.String |
ATT_SOURCE
|
static java.lang.String |
ATT_TEST
|
static java.lang.String |
ATT_UPDATE_ATTRIBUTES
|
static java.lang.String |
ATT_UPDATE_EXISTING
|
static java.lang.String |
ATT_UPDATE_GROUPS
|
static java.lang.String |
ATT_UPDATE_ROLES
|
static java.lang.String |
code_id
|
static java.lang.String |
EL_CORKEYS
|
static java.lang.String |
EL_DEFAULT_PASSWORD
|
static java.lang.String |
EL_EVENT_RESOURCE
|
static java.lang.String |
EL_FIXED_GROUP
|
static java.lang.String |
EL_FIXED_ROLE
|
static java.lang.String |
EL_FORM_REF
|
static java.lang.String |
EL_GROUP_RULE
|
static java.lang.String |
EL_MERGE_ATTRIBUTES
|
static java.lang.String |
EL_ROLE_RULE
|
static java.lang.String |
EL_USER_ACCOUNT_CONFIRMATION_RULE
|
static java.lang.String |
EL_USER_NAME_GENERATION_RULE
|
Fields inherited from class com.waveset.object.PersistentObject |
_trace, trace |
Constructor Summary | |
LoadConfig()
Build a new default load options object. |
|
LoadConfig(org.w3c.dom.Element e)
Build from an element. |
|
LoadConfig(java.lang.String xml)
Build a new default load options object. |
Method Summary | |
protected void |
addSubclassAttributes(java.lang.StringBuffer b)
Each concrete subclass may append to the buffer an XML representation of any fields it adds to PersistentObject (if those field values must persist). |
protected void |
addSubclassElements(java.lang.StringBuffer b)
Each concrete subclass may append to the buffer an XML representation of any fields it adds to PersistentObject (if those field values must persist). |
java.lang.String |
getAccountPrefix()
Get the prefix that will be added to each account name during loading. |
Rule |
getConfirmationRule()
|
ObjectRef |
getConfirmationRuleRef()
|
java.lang.String |
getCorrelationKey()
Get the correlation key. |
Rule |
getCorrelationRule()
|
ObjectRef |
getCorrelationRuleRef()
|
EncryptedData |
getDefaultPassword()
Get the default password. |
boolean |
getDoProvision()
Return true if resource account provisioning is to be performed after a new Waveset account has been created. |
int |
getEstimatedAccounts()
|
Form |
getForm()
|
ObjectRef |
getFormRef()
Get the reference to the fixed group. |
ObjectGroup |
getGroup()
Get the fixed group. |
ObjectRef |
getGroupRef()
Get the reference to the fixed group. |
Rule |
getGroupRule()
Resolve the reference to the group rule, and return the rule object. |
ObjectRef |
getGroupRuleRef()
Get the reference to the group rule. |
java.lang.String |
getInFile()
Get the name of the input exchange file. |
java.io.InputStream |
getInStream()
Get the input stream. |
java.lang.String |
getLogFile()
Get the name of the output log file. |
java.io.OutputStream |
getLogStream()
Get the log output stream. |
int |
getMaxErrors()
Return the maximum number of errors to be allowed during the load. |
java.util.ArrayList |
getMergeAttributes()
Get the list of attributes that are to be merged. |
java.lang.String |
getOutFile()
Get the name of the output object file. |
java.io.OutputStream |
getOutStream()
Get the exception output stream. |
java.util.ArrayList |
getReferences()
Return the list of references within this object. |
boolean |
getReProvision()
Returns true if resource accounts are to be reprovisioned after an existing Waveset is encountered. |
Resource |
getResource()
Get the resolved resource |
ObjectRef |
getResourceRef()
Get the event load resource |
Role |
getRole()
Get the fixed role. |
ObjectRef |
getRoleRef()
Get the reference to the fixed role. |
Rule |
getRoleRule()
Resolve the role rule reference, and return the rule object. |
ObjectRef |
getRoleRuleRef()
Get the reference to the role rule. |
java.lang.String |
getSource()
Get the name of the exchange file source. |
Type |
getType()
Returns the associated Type object. |
Rule |
getUserAccountConfirmationRule()
|
ObjectRef |
getUserAccountConfirmationRuleRef()
|
Rule |
getUserNameGenerationRule()
|
ObjectRef |
getUserNameGenerationRuleRef()
|
boolean |
isCorrelationRequired()
Get the correlation required flag. |
boolean |
isEventLoad()
Test the event load flag |
boolean |
isExternalUsers()
Get the external users flag. |
boolean |
isGeneratePasswords()
Get the generate passwords flag. |
boolean |
isIgnoreGroups()
Get the ignore groups flag. |
boolean |
isIgnorePasswords()
Get the ignore passwords flag. |
boolean |
isIgnoreRoles()
Get the ignore roles flag. |
boolean |
isTestMode()
Get the test mode flag. |
boolean |
isUpdateAttributes()
Get the update existing account flag. |
boolean |
isUpdateGroups()
Get the update groups flag. |
boolean |
isUpdateRoles()
Get the update roles flag. |
static void |
main(java.lang.String[] args)
|
protected void |
parseSubclassAttributes(org.w3c.dom.Element e)
Each concrete subclass should parse from the XML buffer any persisted subclass-specific fields (generally, the same ones that it writes into the buffer). |
protected void |
parseSubclassElements(org.w3c.dom.Element e)
Each concrete subclass should parse from the XML buffer any persisted subclass-specific elements (generally, the same ones that it writes into the buffer). |
void |
setAccountPrefix(java.lang.String s)
Set the prefix that will be added to each account name during loading. |
void |
setConfirmationRule(Rule rule)
|
void |
setConfirmationRuleRef(ObjectRef ref)
|
void |
setCorrelationKey(java.lang.String s)
Set the correlation key. |
void |
setCorrelationRequired(boolean b)
Set the correlation required flag. |
void |
setCorrelationRule(Rule rule)
|
void |
setCorrelationRuleRef(ObjectRef ref)
|
void |
setDefaultPassword(EncryptedData ed)
Set the default password string. |
void |
setDoProvision(boolean b)
Sets the resource account provisioning option. |
void |
setEstimatedAccounts(int num)
|
void |
setExternalUsers(boolean b)
Set the external users flag. |
void |
setFormRef(ObjectRef ref)
Get the reference to the fixed group. |
void |
setGeneratePasswords(boolean b)
Set the generate passwords flag. |
void |
setGroup(ObjectGroup group)
Set the fixed group. |
void |
setGroupRef(ObjectRef ref)
Set the reference to the group. |
void |
setGroupRule(Rule rule)
Set the group rule, specified as an object. |
void |
setGroupRule(java.lang.String name)
Set the group rule, specified by name. |
void |
setGroupRuleRef(ObjectRef ref)
Set the reference to the group rule. |
void |
setIgnoreGroups(boolean b)
Set the ignore roles flag. |
void |
setIgnorePasswords(boolean b)
Set the ignore passwords flag. |
void |
setIgnoreRoles(boolean b)
Set the ignore roles flag. |
void |
setInFile(java.lang.String s)
Set the name of the input exchange file. |
void |
setInStream(java.io.InputStream is)
Set the input stream. |
void |
setLogFile(java.lang.String s)
Set the name of the output log file. |
void |
setLogStream(java.io.OutputStream os)
Set the log output stream. |
void |
setMaxErrors(int i)
Specify the maximum number of errors to be allowed during the load. |
void |
setMergeAttributes(java.util.ArrayList l)
Set the merge attributes list. |
void |
setOutFile(java.lang.String s)
Set the name of the output object file. |
void |
setOutStream(java.io.OutputStream os)
Set the exception output stream. |
void |
setReProvision(boolean b)
Sets the resource account reprovisioning option. |
void |
setResourceRef(ObjectRef ref)
Set the load resource |
void |
setRole(Role role)
Set the fixed role. |
void |
setRoleRef(ObjectRef ref)
Set the reference to the role. |
void |
setRoleRule(Rule rule)
Set the role rule reference, given a rule object. |
void |
setRoleRule(java.lang.String name)
Set the reference to the role rule by name. |
void |
setRoleRuleRef(ObjectRef ref)
Set the reference to the role rule. |
void |
setSource(java.lang.String s)
Set the name of the exchange file source. |
void |
setTestMode(boolean b)
Set the test mode flag. |
void |
setUpdateAttributes(boolean b)
Set the update existing account flag. |
void |
setUpdateGroups(boolean b)
Set the update groups flag. |
void |
setUpdateRoles(boolean b)
Set the update roles flag. |
void |
setUserAccountConfirmationRule(ObjectRef ref)
|
void |
setUserAccountConfirmationRule(Rule rule)
|
void |
setUserNameGenerationRule(ObjectRef ref)
|
void |
setUserNameGenerationRule(Rule rule)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String ATT_INFILE
public static final java.lang.String ATT_LOGFILE
public static final java.lang.String ATT_OUTFILE
public static final java.lang.String ATT_SOURCE
public static final java.lang.String ATT_CORRELATION
public static final java.lang.String ATT_PREFIX
public static final java.lang.String ATT_PROVISION
public static final java.lang.String ATT_REPROVISION
public static final java.lang.String ATT_EXTERNAL
public static final java.lang.String ATT_IGNORE_PASSWORDS
public static final java.lang.String ATT_GENERATE_PASSWORDS
public static final java.lang.String ATT_IGNORE_ROLES
public static final java.lang.String ATT_IGNORE_GROUPS
public static final java.lang.String ATT_CORRELATION_REQ
public static final java.lang.String ATT_UPDATE_EXISTING
public static final java.lang.String ATT_UPDATE_ATTRIBUTES
public static final java.lang.String ATT_TEST
public static final java.lang.String ATT_MAX_ERRORS
public static final java.lang.String ATT_UPDATE_GROUPS
public static final java.lang.String ATT_UPDATE_ROLES
public static final java.lang.String ATT_EVENT
public static final java.lang.String ATT_ESTIMATED_ACCOUNTS
public static final java.lang.String EL_ROLE_RULE
public static final java.lang.String EL_FIXED_ROLE
public static final java.lang.String EL_GROUP_RULE
public static final java.lang.String EL_USER_NAME_GENERATION_RULE
public static final java.lang.String EL_USER_ACCOUNT_CONFIRMATION_RULE
public static final java.lang.String EL_FIXED_GROUP
public static final java.lang.String EL_CORKEYS
public static final java.lang.String EL_EVENT_RESOURCE
public static final java.lang.String EL_MERGE_ATTRIBUTES
public static final java.lang.String EL_DEFAULT_PASSWORD
public static final java.lang.String EL_FORM_REF
Constructor Detail |
public LoadConfig()
public LoadConfig(org.w3c.dom.Element e) throws WavesetException
public LoadConfig(java.lang.String xml) throws WavesetException
Method Detail |
public void setEstimatedAccounts(int num)
public int getEstimatedAccounts()
public Type getType()
getType
in class PersistentObject
public java.util.ArrayList getReferences()
getReferences
in class PersistentObject
public java.lang.String getInFile()
public void setInFile(java.lang.String s)
public java.io.InputStream getInStream()
public void setInStream(java.io.InputStream is)
public java.lang.String getLogFile()
public void setLogFile(java.lang.String s)
public java.io.OutputStream getLogStream()
public void setLogStream(java.io.OutputStream os)
public java.lang.String getOutFile()
This file will be contain the XML representations of any objects in the input file that could not be processed.
public void setOutFile(java.lang.String s)
public java.io.OutputStream getOutStream()
public void setOutStream(java.io.OutputStream os)
public java.lang.String getSource()
public void setSource(java.lang.String s)
public java.lang.String getCorrelationKey()
public void setCorrelationKey(java.lang.String s)
public java.lang.String getAccountPrefix()
public void setAccountPrefix(java.lang.String s)
public ObjectRef getRoleRef()
public Role getRole() throws WavesetException
WavesetException
public void setRoleRef(ObjectRef ref)
public void setRole(Role role)
public ObjectRef getRoleRuleRef()
public void setRoleRuleRef(ObjectRef ref)
public void setRoleRule(java.lang.String name)
public void setRoleRule(Rule rule)
public Rule getRoleRule() throws WavesetException
WavesetException
public ObjectRef getGroupRef()
public ObjectGroup getGroup() throws WavesetException
WavesetException
public void setGroupRef(ObjectRef ref)
public void setGroup(ObjectGroup group)
public ObjectRef getGroupRuleRef()
public void setGroupRuleRef(ObjectRef ref)
public void setGroupRule(java.lang.String name)
public void setGroupRule(Rule rule)
public Rule getGroupRule() throws WavesetException
WavesetException
public Rule getCorrelationRule() throws WavesetException
WavesetException
public ObjectRef getCorrelationRuleRef()
public void setCorrelationRuleRef(ObjectRef ref)
public void setCorrelationRule(Rule rule)
public Rule getUserNameGenerationRule() throws WavesetException
WavesetException
public ObjectRef getUserNameGenerationRuleRef()
public void setUserNameGenerationRule(ObjectRef ref)
public void setUserNameGenerationRule(Rule rule)
public Rule getConfirmationRule() throws WavesetException
WavesetException
public ObjectRef getConfirmationRuleRef()
public void setConfirmationRuleRef(ObjectRef ref)
public void setConfirmationRule(Rule rule)
public Rule getUserAccountConfirmationRule() throws WavesetException
WavesetException
public ObjectRef getUserAccountConfirmationRuleRef()
public void setUserAccountConfirmationRule(ObjectRef ref)
public void setUserAccountConfirmationRule(Rule rule)
public boolean getDoProvision()
public void setDoProvision(boolean b)
Session.reProvision
method.
Note that this option affects the behavior of new account creation
only. When the loader discovers an account that already exists,
resource provisioning is controlled by an option specified
with the setReProvosion
method.
setReProvision(boolean)
public boolean getReProvision()
public void setReProvision(boolean b)
Note that this option affects the behavior of the loader
when existing accounts are detected. Resource provisioning
for new accounts is controlled by the option
specified with the setDoProvosion
method.
setDoProvision(boolean)
public int getMaxErrors()
public void setMaxErrors(int i)
public boolean isExternalUsers()
public void setExternalUsers(boolean b)
When set, the accounts created in Waveset will be marked as "external". When an account is marked external, Waveset will not attempt to update or remove any resource accounts that may currently exist, only the Waveset user account object will be updated.
This option is not currently used, and I forget the reason why it was there.
public boolean isCorrelationRequired()
public void setCorrelationRequired(boolean b)
When set, new accounts will never be created, we will only update existing accounts found through the correlation key.
This can be used if you suspect that the correlation keys are inaccurate, and want to avoid creating a bunch of "garabge" accounts that have to be deleted after the keys are fixed.
Any object that does not correlation to an existing account will be added to the output exchange file.
public boolean isUpdateAttributes()
public void setUpdateAttributes(boolean b)
When set, if we encounter an existing account during the load, we will modify all of its attributes to match those found in the loaded user object. Normally, existing account attributes are not modified.
This can be used to repair attributes that were loaded incorrectly the first time.
public java.util.ArrayList getMergeAttributes()
public void setMergeAttributes(java.util.ArrayList l)
public boolean isUpdateGroups()
public void setUpdateGroups(boolean b)
public boolean isUpdateRoles()
public void setUpdateRoles(boolean b)
public boolean isIgnorePasswords()
public boolean isGeneratePasswords()
public EncryptedData getDefaultPassword()
public boolean isIgnoreGroups()
public boolean isIgnoreRoles()
public void setIgnorePasswords(boolean b)
When this option is true, passwords in the exchange file will be ignored, and a new password will be generated.
When the option is false, we will attempt to use the password as the waveset account password and password for the associated resources. If provisioning is enabled, account creation may fail if the password does not adhere to any policies specified in the resources.
Note that currently the password must be represented in the exchange in its unencrypted form, since we cannot know the encryption key that was used when the file was generated.
public void setGeneratePasswords(boolean b)
public void setDefaultPassword(EncryptedData ed)
public void setIgnoreRoles(boolean b)
public void setIgnoreGroups(boolean b)
public boolean isTestMode()
public void setTestMode(boolean b)
This option will exercise most of the logic in the loading process, but will prevent the actual creation of Waveset accounts and provisioning of resource accounts. This might be used to perform a validation pass on the exchange file before modifying the repository.
public boolean isEventLoad()
public ObjectRef getResourceRef()
public void setResourceRef(ObjectRef ref)
public Resource getResource() throws WavesetException
WavesetException
public ObjectRef getFormRef()
public void setFormRef(ObjectRef ref)
public Form getForm() throws WavesetException
WavesetException
protected void addSubclassAttributes(java.lang.StringBuffer b)
PersistentObject
NOTE: Any subclass that overrides this method must similarly override parseSubclassAttributes() so that the subclass attributes are restored.
addSubclassAttributes
in class PersistentObject
protected void addSubclassElements(java.lang.StringBuffer b)
PersistentObject
NOTE: Any subclass that overrides this method must similarly override parseSubclassElements() so that the subclass elements are restored.
addSubclassElements
in class PersistentObject
protected void parseSubclassAttributes(org.w3c.dom.Element e) throws WavesetException
PersistentObject
parseSubclassAttributes
in class PersistentObject
WavesetException
PersistentObject's default implementation is a no-op.
,
PersistentObject.parseXml(Element)
protected void parseSubclassElements(org.w3c.dom.Element e) throws WavesetException
PersistentObject
parseSubclassElements
in class PersistentObject
WavesetException
PersistentObject's default implementation is a no-op.
,
PersistentObject.parseXml(Element)
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |