Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create IdentityManagementOverrideResourceLoader Class
  2. Resulting Skeleton Code
    Code Block
    titleIdentityManagementOverrideResourceLoader.java
    package edu.ucdavis.iet.mw.kuali.rice;
    
    import org.kuali.rice.resourceloader.BaseResourceLoader;
    
    public class IdentityManagementOverrideResourceLoader extends BaseResourceLoader {
    
    }
    
  3. Add Constructor and Attributes
    Code Block
    titleIdentityManagementOverrideResourceLoader.java
    package edu.ucdavis.iet.mw.kuali.rice;
    
    import javax.xml.namespace.QName;
    import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
    import org.kuali.rice.resourceloader.BaseResourceLoader;
    
    public class IdentityManagementOverrideResourceLoader extends BaseResourceLoader {
    
    	public IdentityManagementOverrideResourceLoader(){
    		super(new QName("IdentityManagementOverrideResourceLoader"));
    	}
    	
    	private static final String SPRING_FILE = "classpath:SpringBeans.xml";
    	
    	private ClassPathXmlApplicationContext context;
    	
    }
    
  4. Override start(), stop() and getService(QName) Methods
  5. Implement Methods
    Code Block
    titleIdentityManagementOverrideResourceLoader.java
    
    package edu.ucdavis.iet.mw.kuali.rice;
    
    import javax.xml.namespace.QName;
    import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
    import org.kuali.rice.resourceloader.BaseResourceLoader;
    import edu.iu.uis.eden.KEWServiceLocator;
    
    public class IdentityManagementOverrideResourceLoader extends BaseResourceLoader {
    
    	public IdentityManagementOverrideResourceLoader(){
    		super(new QName("IdentityManagementOverrideResourceLoader"));
    	}
    	
    	private static final String SPRING_FILE = "classpath:SpringBeans.xml";
    	
    	private ClassPathXmlApplicationContext context;
    
    	public Object getService(QName serviceName) {
    		String springServiceName = serviceName.getLocalPart();
    		if (KEWServiceLocator.USER_SERVICE.equals(springServiceName)) {
    			return context.getBean(springServiceName);
    		}
    		return super.getService(serviceName);
    	}
    
    	public void start() throws Exception {
    		context = new ClassPathXmlApplicationContext(SPRING_FILE);
    		super.start();
    	}
    
    	public void stop() throws Exception {
    		if (context != null) {
    			context.stop();
    			context = null;
    		}
    		super.stop();
    	}
    	
    }
    

Implement User Service

  1. Create LDAPIdentityManagementService Class:

Reference

https://test.kuali.org/confluence/display/KULRICE/Workflow+Plugin+Guide
https://test.kuali.org/confluence/display/KULRICE/JA-SIG+Spring+2008+-+Building+the+Plug-in