Skip Headers
Oracle® Identity Manager Connector Guide for IBM RACF Advanced
Release 9.0.4

Part Number E10451-20
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

G Creating Custom Scheduled Tasks

The following sections provide information about Java classes that you can use to create scheduled tasks for user reconciliation and lookup field synchronization:

See one of the following guides for detailed information about creating scheduled tasks and adding lookup fields for provisioning operations:

G.1 Code for Searching All Users and All User Data

Use the following class to create a scheduled task for fetching user data from the target system:

public void testSearchAllUsers() {
        
try {
            
            
SearchControls ctls = new SearchControls();
// SET COUNT LIMIT to 0 for all users //
ctls.setCountLimit(5);
            
            
// Search for objects that have those matching attributes - (objectclass=*)
//or (objectclass=idforgperson) is supported
NamingEnumeration answer =
ctx.search("ou=People,dc=racf,dc=com", "(objectclass=idforgperson)", ctls );
            
 
while( answer.hasMoreElements() ) {
     SearchResult result = (SearchResult)answer.nextElement();
     Attributes as = result.getAttributes();
      
} 
            
} catch( NamingException nException ) {
  System.out.println(nException.toString());
}

G.2 Code for Searching All Groups and All Group Data

Use the following class to create a scheduled task for fetching group data from the target system. This data can be used to synchronize a group lookup field.

public void testSearchAllGroups() {
        
try {
            
            
SearchControls ctls = new SearchControls();
// SET COUNT LIMIT to 0 for all users //
ctls.setCountLimit(0);
            
            
// Search for objects that have those matching attributes - (objectclass=*)
//or (objectclass=idforggroup) is supported
NamingEnumeration answer =
ctx.search("ou=Groups,dc=racf,dc=com", "(objectclass=idforggroup)", ctls );
            
 
while( answer.hasMoreElements() ) {
     SearchResult result = (SearchResult)answer.nextElement();
     Attributes as = result.getAttributes();
      
} 
            
} catch( NamingException nException ) {
  System.out.println(nException.toString());
}
 

G.3 Code for Searching All Datasets and All Dataset Data

Use the following class to create a scheduled task for fetching dataset data from the target system. This data can be used to synchronize a dataset lookup field.

public void testSearchAllDatasets() {
        
try {
            
            
SearchControls ctls = new SearchControls();
// SET COUNT LIMIT to 0 for all users //
ctls.setCountLimit(5);
            
            
// Search for objects that have those matching attributes - (objectclass=*)
//or (objectclass=idforgdataset) is supported
NamingEnumeration answer =
ctx.search("ou=Datasets,dc=racf,dc=com", "(objectclass=idforgdataset)", ctls
);
            
 
while( answer.hasMoreElements() ) {
     SearchResult result = (SearchResult)answer.nextElement();
     Attributes as = result.getAttributes();
      
} 
            
} catch( NamingException nException ) {
  System.out.println(nException.toString());
}