OIM API To Find Appinstance


package com.provision;
import java.util.List;

import com.connection.Platform;

import oracle.iam.provisioning.api.ApplicationInstanceService;
import oracle.iam.provisioning.vo.ApplicationInstance;
import oracle.iam.provisioning.vo.FormField;
import oracle.iam.provisioning.vo.FormInfo;
public class FindAppInstances {
 public static void main(String[] args) throws Exception {
       
       
        ApplicationInstanceService aiSvc = Platform.getService(ApplicationInstanceService.class);

        //SearchCriteria criteria = new SearchCriteria(ApplicationInstance.APPINST_NAME,
        //    "simapp1", SearchCriteria.Operator.EQUALS);

        ApplicationInstance ai = aiSvc.findApplicationInstanceByName("discon1");

        //List<ApplicationInstance> aiLst = aiSvc.findApplicationInstance(criteria, new HashMap());

        //ContextManager.popContext();
        
        //for(ApplicationInstance ai : aiLst) {

        String aiName = ai.getApplicationInstanceName();
        String roName = ai.getObjectName();
        String itresName = ai.getItResourceName();
        String dispName = ai.getDisplayName();
        String desc = ai.getDescription();
        boolean softDel = ai.isSoftDelete();
        String type = ai.getType().toString();

        System.out.println("ai name = " + aiName);
        System.out.println("ro name = " + roName);
        System.out.println("itres name = " + itresName);
        System.out.println("disp name = " + dispName);
        System.out.println("desc = " + desc);
        System.out.println("softdel = " + softDel);
        System.out.println("type = " + type);

        FormInfo pForm = ai.getAccountForm();
        List<FormInfo> cForms = ai.getChildForms();
    }


    public static void printFormInfo(FormInfo f) {
        System.out.println("form name = " + f.getName());
        System.out.println("form desc = " + f.getDescription());
        System.out.println("latest vers = " + f.getLatestVersion());
        System.out.println("active vers = " + f.getActiveVersion());

        List<FormField> fields = f.getFormFields();

        for (FormField ff : fields) {
        }

    }

}

No comments:

Post a Comment

About OIM

Oracle Identity Management enables organizations to effectively manage the end - to - end life - cycle of user ide...

Popular Posts