Examples of DynamicURI


Examples of org.apache.turbine.util.DynamicURI

            user = (JetspeedUser)JetspeedSecurity.getUser(
                       rundata.getParameters().getString(SecurityConstants.PARAM_ENTITY_ID));

            if (rundata.getUser().getUserName().equals(user.getUserName()))
            {
                DynamicURI duri = new DynamicURI (rundata);
                duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USER_UPDATE);
                duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_CANT_DELETE_CURRENT);
                if (user != null)
                    duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, user.getUserName());
                duri.addQueryData(SecurityConstants.PARAM_MODE, SecurityConstants.PARAM_MODE_DELETE);
                rundata.setRedirectURI(duri.toString());
                // save values that user just entered so they don't have to re-enter
                if (user != null)
                   rundata.getUser().setTemp(TEMP_USER, user);
                return;
            }

            //
            // remove the user
            //
            JetspeedSecurity.removeUser(user.getUserName());

        }
        catch (Exception e)
        {
           // log the error msg
            logger.error("Exception", e);

            //
            // error on delete - display error message
            //
            DynamicURI duri = new DynamicURI (rundata);
            duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USER_UPDATE);
            duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_DELETE_FAILED);
            if (user != null)
                duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, user.getUserName());
            duri.addQueryData(SecurityConstants.PARAM_MODE, SecurityConstants.PARAM_MODE_DELETE);
            rundata.setRedirectURI(duri.toString());

            // save values that user just entered so they don't have to re-enter
           if (user != null)
               rundata.getUser().setTemp(TEMP_USER, user);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.