Package org.jasig.portal.security

Examples of org.jasig.portal.security.IPerson


    public DelegationActionResponse doAction(ActionRequest actionRequest, ActionResponse actionResponse, DelegationRequest delegationRequest) throws IOException {
        final HttpServletRequest request = this.portalRequestUtils.getOriginalPortalRequest(actionRequest);
        final HttpServletResponse response = this.portalRequestUtils.getOriginalPortalResponse(actionRequest);

        //Sanity check that the dispatch is being called by the same user it was created for
        final IPerson person = this.personManager.getPerson(request);
        if (this.userId != person.getID()) {
            throw new IllegalStateException("This dispatcher was created for userId " + this.userId + " but is being executed for userId " + person.getID());
        }
       
        this.setupDelegateRequestInfo(request, delegationRequest);
       
        final RedirectCapturingResponse capturingResponse = new RedirectCapturingResponse(response);
View Full Code Here


    public DelegationResponse doRender(RenderRequest renderRequest, RenderResponse renderResponse, DelegationRequest delegationRequest, Writer writer) throws IOException {
        final HttpServletRequest request = this.portalRequestUtils.getOriginalPortletAdaptorRequest(renderRequest);
        final HttpServletResponse response = this.portalRequestUtils.getOriginalPortalResponse(renderRequest);

        //Sanity check that the dispatch is being called by the same user it was created for
        final IPerson person = this.personManager.getPerson(request);
        if (this.userId != person.getID()) {
            throw new IllegalStateException("This dispatcher was created for userId " + this.userId + " but is being executed for userId " + person.getID());
        }

        this.setupDelegateRequestInfo(request, delegationRequest);
       
        final ContainerInvocation invocation = ContainerInvocation.getInvocation();
View Full Code Here

@Deprecated
public class ChannelRuntimeDataToPersonConverter {

    public IPerson channelRuntimeDataToPerson( ChannelRuntimeData channelRuntimeData ) {

        IPerson newborn = new PersonImpl();
       
        for (String channelRuntimeDataParameterName : channelRuntimeData.getParameters().keySet()) {
          if (! channelRuntimeDataParameterName.equals(Constants.FORMACTION)) {
            String paramValue = channelRuntimeData.getParameter(channelRuntimeDataParameterName);
            // this null handling is required becausee PersonImpl is a HashTable
            // which does not allow null user attribute values
            if (paramValue == null) {
              paramValue = "";
            }
            newborn.setAttribute(channelRuntimeDataParameterName, paramValue);
          }
        }
      
        return newborn;
    }// crd2persion
View Full Code Here

         else {
             userName = channelRuntimeData.getParameter(Constants.FORMCHOSEN);
         }

         if (userName != null) {
             final IPerson user = this.dataHandler.getUser(userName);
             people = new IPerson[] { user };
         }
     }


     if( !managerMode && !mode.equals(Constants.MODEABOUT) && !mode.equals(Constants.MODEHELP) ) {// always override
       mode = Constants.MODEPWDCHNG;
       final String userName = (String) channelStaticData.getPerson().getAttribute(Constants.ATTRUSERNAME);
       final IPerson user = this.dataHandler.getUser(userName);
       people = new IPerson[] { user };
     }

     if( (managerMode || ( !managerMode && personalDocument == null ))
             && !mode.equals(Constants.MODEABOUT) && !mode.equals(Constants.MODEHELP) ) {
View Full Code Here

    public void testInitSession() throws Exception {
        final ChannelStaticData channelStaticData = new ChannelStaticData();
        channelStaticData.setChannelPublishId("1");
        channelStaticData.setChannelSubscribeId("sub1");
       
        final IPerson person = createMock(IPerson.class);
        expect(person.getID()).andReturn(1);
        channelStaticData.setPerson(person);

       
        final MockHttpServletRequest request = new MockHttpServletRequest();
        final MockHttpServletResponse response = new MockHttpServletResponse();
View Full Code Here

       
        return null;
    }

    public void testAction() throws Exception {
        final IPerson person = createMock(IPerson.class);

       
        final ChannelStaticData channelStaticData = new ChannelStaticData();
        channelStaticData.setChannelPublishId("pub1");
        channelStaticData.setChannelSubscribeId("sub1");
View Full Code Here

    public void testGenerateCacheKey() throws Exception {
        final ChannelStaticData channelStaticData = new ChannelStaticData();
        channelStaticData.setChannelPublishId("pub1");
        channelStaticData.setChannelSubscribeId("sub1");
       
        final IPerson person = createMock(IPerson.class);
        channelStaticData.setPerson(person);


        final MockHttpServletRequest request = new MockHttpServletRequest();
        final MockHttpServletResponse response = new MockHttpServletResponse();
View Full Code Here

    public void testIsCacheValidTargetedPorlet() throws Exception {
        final ChannelStaticData channelStaticData = new ChannelStaticData();
        channelStaticData.setChannelPublishId("pub1");
        channelStaticData.setChannelSubscribeId("sub1");
       
        final IPerson person = createMock(IPerson.class);
        channelStaticData.setPerson(person);


        final MockHttpServletRequest request = new MockHttpServletRequest();
        final MockHttpServletResponse response = new MockHttpServletResponse();
View Full Code Here

    public void testIsCacheValidNotConfigured() throws Exception {
        final ChannelStaticData channelStaticData = new ChannelStaticData();
        channelStaticData.setChannelPublishId("pub1");
        channelStaticData.setChannelSubscribeId("sub1");
       
        final IPerson person = createMock(IPerson.class);
        channelStaticData.setPerson(person);


        final MockHttpServletRequest request = new MockHttpServletRequest();
        final MockHttpServletResponse response = new MockHttpServletResponse();
View Full Code Here

    public void testIsCacheValidNeverCache() throws Exception {
        final ChannelStaticData channelStaticData = new ChannelStaticData();
        channelStaticData.setChannelPublishId("pub1");
        channelStaticData.setChannelSubscribeId("sub1");
       
        final IPerson person = createMock(IPerson.class);
        channelStaticData.setPerson(person);


        final MockHttpServletRequest request = new MockHttpServletRequest();
        final MockHttpServletResponse response = new MockHttpServletResponse();
View Full Code Here

TOP

Related Classes of org.jasig.portal.security.IPerson

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.