Package org.jahia.registries

Examples of org.jahia.registries.ServicesRegistry


     */
    public void service(HttpServletRequest request,
                        HttpServletResponse response)
            throws Exception {
        // get services...
        ServicesRegistry sReg = ServicesRegistry.getInstance();
        if (sReg != null) {
            uMgr = sReg.getJahiaUserManagerService();
            gMgr = sReg.getJahiaGroupManagerService();
        }
        // get the current website. get the jahiaserver if it's null...
        jahiaSite = (JahiaSite) request.getSession().getAttribute(ProcessingContext.SESSION_SITE);
        JahiaData jData = (JahiaData) request.getAttribute("org.jahia.data.JahiaData");
        this.jParams = jData.getProcessingContext();

        if (jahiaSite == null) {
            JahiaSitesService sitesService = sReg.getJahiaSitesService();
            jahiaSite = sitesService.getSite(0);
            request.getSession().setAttribute(ProcessingContext.SESSION_SITE, jahiaSite);
        }
        userRequestDispatcher(request, response, request.getSession());
    } // end constructor
View Full Code Here


    public void service( HttpServletRequest request,
                        HttpServletResponse response )
    throws Exception
    {
        // get services...
        ServicesRegistry sReg = ServicesRegistry.getInstance();
        if (sReg != null) {
            userManager = sReg.getJahiaUserManagerService();
        }

        JahiaData jData = (JahiaData) request.getAttribute("org.jahia.data.JahiaData");
        this.jParams = jData.getProcessingContext();
View Full Code Here

            final String username = httpServletRequest.getParameter("username");
            final String password = httpServletRequest.getParameter("password");

            if ((username != null) && (password != null)) {
                final ServicesRegistry theRegistry = ServicesRegistry.getInstance();
                if (theRegistry != null) {
                    JahiaUserManagerService theService = theRegistry.getJahiaUserManagerService();
                    if (theService != null) {
                        // Check if the user has site access ( even though it is not a user of this site )
                        theUser = ServicesRegistry.getInstance().getJahiaUserManagerService().lookupUser(username);
                        if (theUser != null) {
                            if (theUser.verifyPassword(password)) {
View Full Code Here

        if (isRoot() && JahiaGroupManagerService.POWERFUL_GROUPS.contains(name)) {
            return true;
        }
       
        // Get the services registry
        ServicesRegistry servicesRegistry = ServicesRegistry.getInstance();
        if (servicesRegistry != null) {

            // get the group management service
            JahiaGroupManagerService groupService = servicesRegistry.getJahiaGroupManagerService();

            // lookup the requested group
            JahiaGroup group = groupService.lookupGroup(siteID, name);
            if (group != null) {
                return group.isMember(this);
View Full Code Here

     * @param request  Servlet request.
     * @param response Servlet response.
     */
    public void service(HttpServletRequest request, HttpServletResponse response) throws Exception {

        ServicesRegistry sReg = ServicesRegistry.getInstance();
        if (sReg != null) {
            sMgr = sReg.getJahiaSitesService();
        }

        this.jParams = (ProcessingContext) request.getAttribute("org.jahia.params.ParamBean");

        userRequestDispatcher(request, response, request.getSession());
View Full Code Here

        throws JahiaException {

        logger.debug("Start the Services Registry ...");

        try {
            final ServicesRegistry registry = ServicesRegistry.getInstance();
            if (registry != null) {
                registry.init(Jahia.jSettings);
                logger.debug("Services Registry is running...");
                return true;
            }

            logger.debug(
View Full Code Here

    public boolean isAdminMember(int siteID) {
        return isMemberOfGroup(siteID, JahiaGroupManagerService.ADMINISTRATORS_GROUPNAME);
    }

    public boolean isMemberOfGroup(int siteID, String name) {
        ServicesRegistry servicesRegistry = ServicesRegistry.getInstance();
        if (servicesRegistry != null) {
            // lookup the requested group
            JahiaGroup group = servicesRegistry.getJahiaGroupManagerService().lookupGroup(siteID,
                    name);
            if (group != null) {
                return group.isMember(this);
            }
        }
View Full Code Here

TOP

Related Classes of org.jahia.registries.ServicesRegistry

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.