[Building Sakai] permission creation in spring archetype

Mike Jennings mike_jennings at unc.edu
Fri Mar 16 11:45:01 PDT 2012


Aatish,

Sorry it took so long for me to get back to you.  I had no issues wiring 
up my class by putting the code in the ProjectLogicImpl.java class 
located in the impl project and wiring it up in the components.xml file 
located in the pack project.

I have tarred up my project and it is attached.  I hope that this helps.

I did this really quick as a test and all worked great for me :D... I 
would check to see that you are not importing the cover version of the 
FunctionManager in your impl class.

Mike Jennings

==============================================================================
Mike Jennings
Teaching and Learning Developer
University of North Carolina at Chapel Hill

Office: (919) 843-5013
Cell: (919) 698-3746
E-mail: mike_jennings at unc.edu

On 3/15/2012 3:41 AM, Aatish Thakre wrote:
> Hi Mike
> i am creating spring web-mvc project I am fails to register the
> permission because the FunctionManager service is not injected
> MyclassImpl class is
>
> public class MyExternalLogicImpl implements MyExternalLogic {
> 	private static Log log = LogFactory.getLog(MyExternalLogicImpl.class);
> 	
>
> 	
> 	private FunctionManager functionManager;
> 	public void setFunctionManager(FunctionManager functionManager) {
> 		this.functionManager = functionManager;
> 	}
> 	
> 	public void init() {
> 		log.debug("init");
> 		// register Sakai permissions for this tool
> 		log.info("You are n project MylogicImpl Impl");
> 		
> 		functionManager.registerFunction(ITEM_READ);
> 	}
> }
>
> And component xml is
> <bean id="org.sakaiproject.logic.MyExternalLogic"
>      	class="org.sakaiproject.logic.MyExternalLogicImpl"
>          init-method="init">
>          <!-- API injection -->
>          <property name="functionManager"
> ref="org.sakaiproject.authz.api.FunctionManager" />
>
> 	</bean>
>
>
> please help me
>
>
>
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-tool.tar
Type: application/octet-stream
Size: 92160 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120316/fdc71d1b/attachment.obj 


More information about the sakai-dev mailing list