Package org.apache.cocoon.processing

Examples of org.apache.cocoon.processing.ProcessInfoProvider


    /**
     * Return the current user.
     * @return The current user or null.
     */
    public User getUser() {
        final ProcessInfoProvider pip = (ProcessInfoProvider)WebAppContextUtils.getCurrentWebApplicationContext().getBean(ProcessInfoProvider.ROLE);
        final Map objectModel = pip.getObjectModel();
        return (User)objectModel.get(ApplicationManager.USER);
    }
View Full Code Here


    /**
     * Return the current application.
     * @return The current application or null.
     */
    public Application getApplication() {
        final ProcessInfoProvider pip = (ProcessInfoProvider)WebAppContextUtils.getCurrentWebApplicationContext().getBean(ProcessInfoProvider.ROLE);
        final Map objectModel = pip.getObjectModel();
        return (Application)objectModel.get(ApplicationManager.APPLICATION);
    }
View Full Code Here

    /**
     * Return the current user data.
     * @return The current user data or null.
     */
    public Object getData() {
        final ProcessInfoProvider pip = (ProcessInfoProvider)WebAppContextUtils.getCurrentWebApplicationContext().getBean(ProcessInfoProvider.ROLE);
        final Map objectModel = pip.getObjectModel();
        return objectModel.get(ApplicationManager.APPLICATION_DATA);
    }
View Full Code Here

     * @param user The user to test.
     * @param role The role.
     * @return This returns true, if the user has the role; otherwise false is returned.
     */
    public boolean isUserInRole(final User user, final String role) {
        final ProcessInfoProvider pip = (ProcessInfoProvider)WebAppContextUtils.getCurrentWebApplicationContext().getBean(ProcessInfoProvider.ROLE);
        final Map objectModel = pip.getObjectModel();
        return isUserInRole(user, role, objectModel);
    }
View Full Code Here

    /**
     * Helper method to get the current object model.
     */
    protected static Map getObjectModel() {
        final WebApplicationContext webAppContext = WebAppContextUtils.getCurrentWebApplicationContext();
        final ProcessInfoProvider infoProvider =
            (ProcessInfoProvider)webAppContext.getBean(ProcessInfoProvider.ROLE);
        return infoProvider.getObjectModel();
    }
View Full Code Here

                                                        Monitor        fam,
                                                        ServletContext servletContext)
    throws Exception {
        // let's get the parent container first
        final WebApplicationContext parentContext = WebAppContextUtils.getCurrentWebApplicationContext();
        final ProcessInfoProvider infoProvider = (ProcessInfoProvider) parentContext.getBean(ProcessInfoProvider.ROLE);
        final Request request = ObjectModelHelper.getRequest(infoProvider.getObjectModel());
        // let's determine our context url
        int pos = sitemapLocation.lastIndexOf('/');
        if ( sitemapLocation.lastIndexOf(File.separatorChar) > pos ) {
            pos = sitemapLocation.lastIndexOf(File.separatorChar);
        }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.processing.ProcessInfoProvider

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.