Showing posts with label Context. Show all posts
Showing posts with label Context. Show all posts

Monday, September 23, 2019

SAILPOINT IDENTITY IQ CONTEXT AND TESTING API USING ECLIPSE IDE

SAILPOINT IIQ CONTEXT AND TESTING API USING ECLIPSE IDE

Create the Java Project as per the structure given below , Make sure to create the Resource Dir and copy the latest updated object .hbm files and iiq.properties files (Password as plain Text)

This sailpoint IIQ context creation will be really good if you want to quick test any API for the development..





package com.vishal.connection;


import sailpoint.api.SailPointContext;
import java.text.SimpleDateFormat;
import sailpoint.object.AuditEvent;
import sailpoint.api.SailPointFactory;
import sailpoint.connector.ExpiredPasswordException;
import sailpoint.object.Identity;
import sailpoint.object.IdentitySelector;
import sailpoint.object.IdentityTrigger;
import sailpoint.object.QueryOptions;
import sailpoint.object.Rule;
import sailpoint.spring.SpringStarter;
import sailpoint.tools.GeneralException;

import java.util.*;


public class Connection {
 public static SailPointContext context;
 /**
  * @param args
  * @throws GeneralException 
  * @throws ExpiredPasswordException 
  */
 public static void main(String[] args) throws GeneralException {
  //IIQ propeties file must be present in java project.
  SpringStarter starter = new SpringStarter("iiqBeans"); 
  starter.start();
  SailPointContext context = SailPointFactory.createContext();
  Identity identity = context.getObject(Identity.class, "spadmin");
  String displayName=identity.getDisplayName();
       System.out.println("Identity Details " + identity.getFirstname() + identity.getLastname());
       starter.close();

 }
}