com.waveset.object
Class Discovery

java.lang.Object
  extended bycom.waveset.object.PersistentObject
      extended bycom.waveset.object.Discovery
All Implemented Interfaces:
java.lang.Comparable, javax.naming.Referenceable, XmlObject

public class Discovery
extends PersistentObject

An object which holds parameters associated with the extraction of user accounts from a source resource.

Since there are many options to the extraction process, we use this object as a convenient way to encapsulate all of them. This is a PersistentObject so that it may live in the ObjectCache and light-weight configuration repositories used outside of the main provisisiong server environment.

It may also be stored in the waveset repository, if the source and target resources are all behind the firewall.

A GUI will normally be used to edit the fields, the object will eventually be passed to an Extractor for execution.

Some of the things here could be arguments to the Extractor method that performs the extraction, rather than stored here, think.


Nested Class Summary
 
Nested classes inherited from class com.waveset.object.PersistentObject
PersistentObject.Comparator, PersistentObject.InitialInstance
 
Field Summary
static java.lang.String ACCOUNT_PREFIX
           
static java.lang.String APPLET_GUID
           
static java.lang.String code_id
           
static java.lang.String CONFIRMATION_RULE
           
static java.lang.String CORRELATION_KEY
           
static java.lang.String CORRELATION_KEY_DEFAULT
           
static java.lang.String CORRELATION_REQUIRED
           
static java.lang.String CORRELATION_RULE
           
static java.lang.String CSV
           
static java.lang.String DISCOVERY_NAME
           
static java.lang.String DO_PROVISION
           
static java.lang.String DOWNLOAD_TO_FILE
           
static java.lang.String ERRORS_ONLY
           
static java.lang.String ESTIMATED_ACCOUNTS
           
static java.lang.String ESTIMATED_BYTES
           
static java.lang.String EXTERNAL_USERS
           
static java.lang.String EXTRACT_AND_LOAD
           
static java.lang.String EXTRACT_ONLY
           
static java.lang.String FIXED_ORG
           
static java.lang.String FIXED_ROLE
           
static java.lang.String FROM_RESOURCE
           
static java.lang.String INFORMATIONAL_AND_ABOVE
           
static java.lang.String INPUT_FILE
           
static java.lang.String INPUT_STREAM
           
static java.lang.String LOAD_CONFIG
           
static java.lang.String LOAD_ONLY
           
static java.lang.String LOG_FILE
           
static java.lang.String LOG_STREAM
           
static java.lang.String MAX_ACCOUNTS
           
static java.lang.String MAX_ERRORS
           
static java.lang.String MERGE_ATTRIBUTES
           
static java.lang.String NO_INDIVIDUAL_RESULTS
           
static java.lang.String NOTIFY_WHEN_LAUNCH_COMPLETE
           
static java.lang.String OBJECT_TYPE
           
static java.lang.String ORG_RULE
           
static java.lang.String ORGS_ONLY
           
static java.lang.String OUTPUT_FILE
           
static java.lang.String OUTPUT_FORMAT
           
static java.lang.String OUTPUT_STREAM
           
static java.lang.String RE_PROVISION
           
static java.lang.String RESULT_LEVEL
           
static java.lang.String ROLE_RULE
           
static java.lang.String UPDATE_ATTRIBUTES
           
static java.lang.String UPLOAD_FROM_FILE
           
static java.lang.String USER_FORM
           
static java.lang.String USERS_AND_ORGS
           
static java.lang.String USERS_ONLY
           
static java.lang.String WARNINGS_AND_ERRORS
           
static java.lang.String WHICH_STEPS
           
static java.lang.String XML
           
 
Fields inherited from class com.waveset.object.PersistentObject
_trace, trace
 
Constructor Summary
Discovery()
          Create an empty extract options object.
Discovery(org.w3c.dom.Element e)
          Flesh out the object by parsing its XML representation.
 
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 get(java.lang.String name)
           
 java.lang.String getAccountPrefix()
          An optional prefix to put on all account names.
 Rule getConfirmationRule()
           
 ObjectRef getConfirmationRuleRef()
          Optional rule for testing each correlation result.
 java.lang.String getCorrelationKey()
          The name of the correlation key for account merging.
 boolean getCorrelationRequired()
           
 Rule getCorrelationRule()
           
 ObjectRef getCorrelationRuleRef()
          Optional rule for finding Lighthouse users matching an account.
 java.lang.String getDiscoveryType()
          Is our mission to discover new users, to discover new accounts for existing users, or to reconcile accounts?
 boolean getDoProvision()
           
 boolean getExternalUsers()
           
static Extract getExtractConfig(java.util.Map parameterMap)
           
 ObjectGroup getGroup()
           
 ObjectRef getGroupRef()
          A fixed group to assign.
 Rule getGroupRule()
           
 ObjectRef getGroupRuleRef()
          The optional rule for dynamic group assignment.
static LoadConfig getLoadConfig(java.util.Map parameterMap)
           
 java.lang.String getLogFile()
          The name of the output log file.
 java.io.OutputStream getLogStream()
           
 int getMaxAccounts()
          The maximum number of accounts to extract.
 int getMaxErrors()
          The maximum number of errors to tolerate before canceling the extraction.
 java.lang.String getMergeAttributes()
           
 java.lang.Object getObject(java.lang.String name)
           
static ObjectRef getObjectRef(java.util.Map map, java.lang.String key, Type type)
           
 java.lang.String getObjectType()
           
 java.lang.String getOutputFile()
          The name of the output exchange file.
 java.io.OutputStream getOutputStream()
           
 Resource getResource()
           
 ObjectRef getResourceRef()
          FROM_RESOURCE
 java.lang.String getResultLevel()
           
 Role getRole()
           
 ObjectRef getRoleRef()
          The fixed role to assign;
 Rule getRoleRule()
           
 ObjectRef getRoleRuleRef()
          The optional rule used for dynamic role assignment.
 java.util.Map getTaskArgs()
           
 Type getType()
          Returns the associated Type object.
 boolean getUpdateAttributes()
           
 Configuration getUserForm()
           
 ObjectRef getUserFormRef()
          A user form to apply to each resource account.
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 pre)
           
 void setConfirmationRule(Rule rule)
           
 void setConfirmationRuleRef(ObjectRef ref)
           
 void setCorrelationKey(java.lang.String key)
           
 void setCorrelationRequired(boolean b)
           
 void setCorrelationRule(Rule rule)
           
 void setCorrelationRuleRef(ObjectRef ref)
           
 void setDiscoveryType(java.lang.String discoveryType)
           
 void setDoProvision(boolean b)
           
 void setExternalUsers(boolean b)
           
 void setGroup(ObjectGroup group)
           
 void setGroupRef(ObjectRef ref)
           
 void setGroupRule(Rule rule)
           
 void setGroupRuleRef(ObjectRef ref)
           
 void setLogFile(java.lang.String path)
           
 void setLogStream(java.io.OutputStream s)
           
 void setMaxAccounts(int n)
           
 void setMaxErrors(int n)
           
 void setMergeAttributes(java.lang.String attrList)
           
 void setName(java.lang.String newName)
          Replaces the value of the name attribute.
 void setObjectType(java.lang.String target)
           
 void setOutputFile(java.lang.String path)
           
 void setOutputStream(java.io.OutputStream s)
           
 void setResource(Resource res)
           
 void setResourceRef(ObjectRef ref)
           
 void setResultLevel(java.lang.String resultLevel)
           
 void setRole(Role role)
           
 void setRoleRef(ObjectRef ref)
           
 void setRoleRule(Rule rule)
           
 void setRoleRuleRef(ObjectRef ref)
           
 void setUpdateAttributes(boolean b)
           
 void setUserForm(Configuration userForm)
           
 void setUserFormRef(ObjectRef ref)
           
 
Methods inherited from class com.waveset.object.PersistentObject
addCommonElements, addEndTag, addMemberObjectGroup, addMemberObjectGroup, addPersistentAttributes, addStartTag, addSummaryAttributes, addXmlHeader, attributesMatch, attributesMatch, attributesMatch, checkReference, checkReferences, clearId, cloneAs, cloneObject, compareTo, create, create, create, create, createLastModItem, createLastModItem, createLastModItemList, directObjectGroupMember, dump, dumpFile, equals, fakeId, getAttribute, getAttributeValues, getAttributeValues, getAuthReferences, getAuthType, getBasicAttributes, getBasicAttributes, getBasicAttributes, getCache, getCounterValue, getCreateDate, getCreator, getDisplayableName, getDisplayName, getElementName, getEncryptedValues, getId, getIdOrName, getInitialInstances, getLastMod, getLastModDate, getLastModifier, getLastModItemId, getLockInfo, getMemberObjectGroupRefs, getMemberObjectGroupRefsUpTo, getMemberObjectGroups, getName, getNameOrId, getProperties, getProperty, getPropertyAsString, getPropertyList, getQueryableAttributes, getReference, getReferences, getRuleDrivenMemberObjectGroupRefs, getRuleDrivenMemberObjectGroupRefsUpTo, getRuleDrivenMemberObjectGroups, getSubtype, getSummaryAttributes, getSummaryString, hasEncryptedData, hashCode, identityEquals, isAlias, isHidden, isId, isProtected, isProtectedFromDelete, isReferencedIn, listOperationalAttributes, listQueryableAttributes, listQueryableReferenceAttributes, listSummaryAttributes, objectGroupMember, objectGroupMemberRef, parseCommonElement, parseCommonElements, parsePersistentAttributes, parseXml, parseXml, prepareForSerialization, prepareToSerialize, println, reEncrypt, reEncryptSubclassAttributes, removeMemberObjectGroup, removeProperty, resolve, resolve, resolve, resolveArray, resolveArrayByFetching, resolveObjectReference, resolveObjectReferences, resolveReference, resolveSummaryAttributes, resolveSummaryAttributes, ruleDrivenObjectGroupMemberRef, setAuthType, setAuthType, setCache, setCreateDate, setCreator, setDisplayName, setDisplayName, setHidden, setIsAlias, setLastMod, setLastMod, setLastModDate, setLastModifier, setMemberObjectGroupRef, setMemberObjectGroupRefs, setMemberObjectGroups, setProperties, setProperty, setPropertyList, setProtected, setProtectedFromDelete, setRuleDrivenMembersCache, setSubtype, setTrace, toString, toXml, toXml, toXml, toXmlFile, visit
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values

DISCOVERY_NAME

public static final java.lang.String DISCOVERY_NAME
See Also:
Constant Field Values

WHICH_STEPS

public static final java.lang.String WHICH_STEPS
See Also:
Constant Field Values

OBJECT_TYPE

public static final java.lang.String OBJECT_TYPE
See Also:
Constant Field Values

DOWNLOAD_TO_FILE

public static final java.lang.String DOWNLOAD_TO_FILE
See Also:
Constant Field Values

UPLOAD_FROM_FILE

public static final java.lang.String UPLOAD_FROM_FILE
See Also:
Constant Field Values

FROM_RESOURCE

public static final java.lang.String FROM_RESOURCE
See Also:
Constant Field Values

FIXED_ROLE

public static final java.lang.String FIXED_ROLE
See Also:
Constant Field Values

FIXED_ORG

public static final java.lang.String FIXED_ORG
See Also:
Constant Field Values

USER_FORM

public static final java.lang.String USER_FORM
See Also:
Constant Field Values

CORRELATION_RULE

public static final java.lang.String CORRELATION_RULE
See Also:
Constant Field Values

CONFIRMATION_RULE

public static final java.lang.String CONFIRMATION_RULE
See Also:
Constant Field Values

CORRELATION_KEY

public static final java.lang.String CORRELATION_KEY
See Also:
Constant Field Values

CORRELATION_REQUIRED

public static final java.lang.String CORRELATION_REQUIRED
See Also:
Constant Field Values

DO_PROVISION

public static final java.lang.String DO_PROVISION
See Also:
Constant Field Values

RE_PROVISION

public static final java.lang.String RE_PROVISION
See Also:
Constant Field Values

UPDATE_ATTRIBUTES

public static final java.lang.String UPDATE_ATTRIBUTES
See Also:
Constant Field Values

MERGE_ATTRIBUTES

public static final java.lang.String MERGE_ATTRIBUTES
See Also:
Constant Field Values

RESULT_LEVEL

public static final java.lang.String RESULT_LEVEL
See Also:
Constant Field Values

ESTIMATED_BYTES

public static final java.lang.String ESTIMATED_BYTES
See Also:
Constant Field Values

ESTIMATED_ACCOUNTS

public static final java.lang.String ESTIMATED_ACCOUNTS
See Also:
Constant Field Values

NOTIFY_WHEN_LAUNCH_COMPLETE

public static final java.lang.String NOTIFY_WHEN_LAUNCH_COMPLETE
See Also:
Constant Field Values

APPLET_GUID

public static final java.lang.String APPLET_GUID
See Also:
Constant Field Values

ROLE_RULE

public static final java.lang.String ROLE_RULE
See Also:
Constant Field Values

ORG_RULE

public static final java.lang.String ORG_RULE
See Also:
Constant Field Values

MAX_ACCOUNTS

public static final java.lang.String MAX_ACCOUNTS
See Also:
Constant Field Values

MAX_ERRORS

public static final java.lang.String MAX_ERRORS
See Also:
Constant Field Values

ACCOUNT_PREFIX

public static final java.lang.String ACCOUNT_PREFIX
See Also:
Constant Field Values

EXTERNAL_USERS

public static final java.lang.String EXTERNAL_USERS
See Also:
Constant Field Values

LOG_FILE

public static final java.lang.String LOG_FILE
See Also:
Constant Field Values

LOG_STREAM

public static final java.lang.String LOG_STREAM
See Also:
Constant Field Values

INPUT_FILE

public static final java.lang.String INPUT_FILE
See Also:
Constant Field Values

INPUT_STREAM

public static final java.lang.String INPUT_STREAM
See Also:
Constant Field Values

OUTPUT_FILE

public static final java.lang.String OUTPUT_FILE
See Also:
Constant Field Values

OUTPUT_STREAM

public static final java.lang.String OUTPUT_STREAM
See Also:
Constant Field Values

OUTPUT_FORMAT

public static final java.lang.String OUTPUT_FORMAT
See Also:
Constant Field Values

XML

public static final java.lang.String XML
See Also:
Constant Field Values

CSV

public static final java.lang.String CSV
See Also:
Constant Field Values

EXTRACT_ONLY

public static final java.lang.String EXTRACT_ONLY
See Also:
Constant Field Values

LOAD_ONLY

public static final java.lang.String LOAD_ONLY
See Also:
Constant Field Values

EXTRACT_AND_LOAD

public static final java.lang.String EXTRACT_AND_LOAD
See Also:
Constant Field Values

CORRELATION_KEY_DEFAULT

public static final java.lang.String CORRELATION_KEY_DEFAULT

USERS_ONLY

public static final java.lang.String USERS_ONLY
See Also:
Constant Field Values

ORGS_ONLY

public static final java.lang.String ORGS_ONLY
See Also:
Constant Field Values

USERS_AND_ORGS

public static final java.lang.String USERS_AND_ORGS
See Also:
Constant Field Values

LOAD_CONFIG

public static final java.lang.String LOAD_CONFIG
See Also:
Constant Field Values

NO_INDIVIDUAL_RESULTS

public static final java.lang.String NO_INDIVIDUAL_RESULTS
See Also:
Constant Field Values

ERRORS_ONLY

public static final java.lang.String ERRORS_ONLY
See Also:
Constant Field Values

WARNINGS_AND_ERRORS

public static final java.lang.String WARNINGS_AND_ERRORS
See Also:
Constant Field Values

INFORMATIONAL_AND_ABOVE

public static final java.lang.String INFORMATIONAL_AND_ABOVE
See Also:
Constant Field Values
Constructor Detail

Discovery

public Discovery()
Create an empty extract options object.


Discovery

public Discovery(org.w3c.dom.Element e)
          throws WavesetException
Flesh out the object by parsing its XML representation.

Method Detail

getDiscoveryType

public java.lang.String getDiscoveryType()
Is our mission to discover new users, to discover new accounts for existing users, or to reconcile accounts?


setDiscoveryType

public void setDiscoveryType(java.lang.String discoveryType)

getResourceRef

public ObjectRef getResourceRef()
FROM_RESOURCE

!! Should we allow multiple resources here?


getResource

public Resource getResource()
                     throws WavesetException
Throws:
WavesetException

setResourceRef

public void setResourceRef(ObjectRef ref)

setResource

public void setResource(Resource res)

getRoleRuleRef

public ObjectRef getRoleRuleRef()
The optional rule used for dynamic role assignment.


getRoleRule

public Rule getRoleRule()
                 throws WavesetException
Throws:
WavesetException

setRoleRuleRef

public void setRoleRuleRef(ObjectRef ref)

setRoleRule

public void setRoleRule(Rule rule)

getRoleRef

public ObjectRef getRoleRef()
The fixed role to assign;


getRole

public Role getRole()
             throws WavesetException
Throws:
WavesetException

setRoleRef

public void setRoleRef(ObjectRef ref)

setRole

public void setRole(Role role)

getGroupRuleRef

public ObjectRef getGroupRuleRef()
The optional rule for dynamic group assignment.


getGroupRule

public Rule getGroupRule()
                  throws WavesetException
Throws:
WavesetException

setGroupRuleRef

public void setGroupRuleRef(ObjectRef ref)

setGroupRule

public void setGroupRule(Rule rule)

getGroupRef

public ObjectRef getGroupRef()
A fixed group to assign.


getGroup

public ObjectGroup getGroup()
                     throws WavesetException
Throws:
WavesetException

setGroupRef

public void setGroupRef(ObjectRef ref)

setGroup

public void setGroup(ObjectGroup group)

getUserFormRef

public ObjectRef getUserFormRef()
A user form to apply to each resource account.


getUserForm

public Configuration getUserForm()
                          throws WavesetException
Throws:
WavesetException

setUserFormRef

public void setUserFormRef(ObjectRef ref)

setUserForm

public void setUserForm(Configuration userForm)

getCorrelationRuleRef

public ObjectRef getCorrelationRuleRef()
Optional rule for finding Lighthouse users matching an account.


getCorrelationRule

public Rule getCorrelationRule()
                        throws WavesetException
Throws:
WavesetException

setCorrelationRuleRef

public void setCorrelationRuleRef(ObjectRef ref)

setCorrelationRule

public void setCorrelationRule(Rule rule)

getConfirmationRuleRef

public ObjectRef getConfirmationRuleRef()
Optional rule for testing each correlation result.


getConfirmationRule

public Rule getConfirmationRule()
                         throws WavesetException
Throws:
WavesetException

setConfirmationRuleRef

public void setConfirmationRuleRef(ObjectRef ref)

setConfirmationRule

public void setConfirmationRule(Rule rule)

getCorrelationKey

public java.lang.String getCorrelationKey()
The name of the correlation key for account merging.


setCorrelationKey

public void setCorrelationKey(java.lang.String key)

getLogFile

public java.lang.String getLogFile()
The name of the output log file.


setLogFile

public void setLogFile(java.lang.String path)

getLogStream

public java.io.OutputStream getLogStream()

setLogStream

public void setLogStream(java.io.OutputStream s)

getOutputFile

public java.lang.String getOutputFile()
The name of the output exchange file.


setOutputFile

public void setOutputFile(java.lang.String path)

getOutputStream

public java.io.OutputStream getOutputStream()

setOutputStream

public void setOutputStream(java.io.OutputStream s)

getAccountPrefix

public java.lang.String getAccountPrefix()
An optional prefix to put on all account names.


setAccountPrefix

public void setAccountPrefix(java.lang.String pre)

getMaxErrors

public int getMaxErrors()
The maximum number of errors to tolerate before canceling the extraction.

!! Should also allow something that specifes the maximum as a percentage of the total accounts?


setMaxErrors

public void setMaxErrors(int n)

getMaxAccounts

public int getMaxAccounts()
The maximum number of accounts to extract.


setMaxAccounts

public void setMaxAccounts(int n)

getExternalUsers

public boolean getExternalUsers()

setExternalUsers

public void setExternalUsers(boolean b)

getObjectType

public java.lang.String getObjectType()

setObjectType

public void setObjectType(java.lang.String target)

getCorrelationRequired

public boolean getCorrelationRequired()

setCorrelationRequired

public void setCorrelationRequired(boolean b)

getUpdateAttributes

public boolean getUpdateAttributes()

setUpdateAttributes

public void setUpdateAttributes(boolean b)

getDoProvision

public boolean getDoProvision()

setDoProvision

public void setDoProvision(boolean b)

getMergeAttributes

public java.lang.String getMergeAttributes()

setMergeAttributes

public void setMergeAttributes(java.lang.String attrList)

getResultLevel

public java.lang.String getResultLevel()

setResultLevel

public void setResultLevel(java.lang.String resultLevel)

getType

public Type getType()
Returns the associated Type object.

Specified by:
getType in class PersistentObject

setName

public void setName(java.lang.String newName)
Description copied from class: PersistentObject
Replaces the value of the name attribute.

Note that if you change the name of an object, and check the object into the repository using the Session.checkinObject method, this will have the effect of renaming the object in the repository.

Overrides:
setName in class PersistentObject

get

public java.lang.String get(java.lang.String name)
Returns:
an arbitrary attribute if found; otherwise null.

getObject

public java.lang.Object getObject(java.lang.String name)
Returns:
an arbitrary attribute if found; otherwise null.

getTaskArgs

public java.util.Map getTaskArgs()

getLoadConfig

public static LoadConfig getLoadConfig(java.util.Map parameterMap)

getExtractConfig

public static Extract getExtractConfig(java.util.Map parameterMap)

getObjectRef

public static ObjectRef getObjectRef(java.util.Map map,
                                     java.lang.String key,
                                     Type type)
Returns:
an ObjectRef coerced from the value of a map entry, or null if that is impossible.

addSubclassAttributes

protected void addSubclassAttributes(java.lang.StringBuffer b)
Description copied from class: PersistentObject
Each concrete subclass may append to the buffer an XML representation of any fields it adds to PersistentObject (if those field values must persist). PersistentObject's default implementation is a no-op.

NOTE: Any subclass that overrides this method must similarly override parseSubclassAttributes() so that the subclass attributes are restored.

Overrides:
addSubclassAttributes in class PersistentObject
See Also:


addSubclassElements

protected void addSubclassElements(java.lang.StringBuffer b)
Description copied from class: PersistentObject
Each concrete subclass may append to the buffer an XML representation of any fields it adds to PersistentObject (if those field values must persist). PersistentObject's default implementation is a no-op.

NOTE: Any subclass that overrides this method must similarly override parseSubclassElements() so that the subclass elements are restored.

Overrides:
addSubclassElements in class PersistentObject
See Also:


parseSubclassAttributes

protected void parseSubclassAttributes(org.w3c.dom.Element e)
                                throws WavesetException
Description copied from class: PersistentObject
Each concrete subclass should parse from the XML buffer any persisted subclass-specific fields (generally, the same ones that it writes into the buffer).

Overrides:
parseSubclassAttributes in class PersistentObject
Throws:
WavesetException
See Also:

PersistentObject's default implementation is a no-op.

, PersistentObject.parseXml(Element)

parseSubclassElements

protected void parseSubclassElements(org.w3c.dom.Element e)
                              throws WavesetException
Description copied from class: PersistentObject
Each concrete subclass should parse from the XML buffer any persisted subclass-specific elements (generally, the same ones that it writes into the buffer).

Overrides:
parseSubclassElements in class PersistentObject
Throws:
WavesetException
See Also:

PersistentObject's default implementation is a no-op.

, PersistentObject.parseXml(Element)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception