Examples of DomainContext


Examples of org.apache.stratos.adc.topology.mgt.serviceobjects.DomainContext

       
        for (ServiceConfiguration serviceConfiguration : serviceConfigs) {
                 
          List<Integer> tenantIds = LoadBalancerConfigUtil.getTenantIds(serviceConfiguration.getTenantRange());
          if(!tenantIds.isEmpty() && (tenantIds.contains(tenantId) || tenantIds.contains(0))){
            DomainContext domainCtx = new DomainContext(serviceConfiguration.getDomain(), serviceConfiguration.getSubDomain());
            if (!domainContexts.contains(domainCtx)) {
              domainContexts.add(domainCtx);
            }
          }
                }
View Full Code Here

Examples of org.glassfish.api.admin.config.DomainContext

        Config config = glassfish.getService(
                Config.class, serverConfig.getConfigRef());

        // Create a context object for this domain creation to enable the new
        // modules to make decisions
        DomainContext ctx = new DomainContext();
        ctx.setDomainType("dev"); //TODO : Whenever clustering/HA is supported
        // this setting needs to be fixed. Domain type can be dev/ha/cluster and
        // this type needs to be extracted possibly using an api from installer


        // bnevins 12/20/12 -- I'm not touching this ancient getLogger call.
        // because it looks risky.
        ctx.setLogger(LogDomains.getLogger(
                DomainInitializer.class, LogDomains.SERVER_LOGGER));

        // now for every such Inhabitant, fetch the actual initial config and
        // insert it into the module that initial config was targeted for.
        ServiceLocator habitat = glassfish.getService(ServiceLocator.class);
View Full Code Here

Examples of org.glassfish.api.admin.config.DomainContext

        Config config = glassfish.getService(
                Config.class, serverConfig.getConfigRef());

        // Create a context object for this domain creation to enable the new
        // modules to make decisions
        DomainContext ctx = new DomainContext();
        ctx.setDomainType("dev"); //TODO : Whenever clustering/HA is supported
        // this setting needs to be fixed. Domain type can be dev/ha/cluster and
        // this type needs to be extracted possibly using an api from installer
        ctx.setLogger(LogDomains.getLogger(
                DomainInitializer.class, LogDomains.SERVER_LOGGER));

        // now for every such Inhabitant, fetch the actual initial config and
        // insert it into the module that initial config was targeted for.
        ServiceLocator habitat = glassfish.getService(ServiceLocator.class);
View Full Code Here

Examples of org.glassfish.api.admin.config.DomainContext

        Config config = glassfish.getService(
                Config.class, serverConfig.getConfigRef());

        // Create a context object for this domain creation to enable the new
        // modules to make decisions
        DomainContext ctx = new DomainContext();
        ctx.setDomainType("dev"); //TODO : Whenever clustering/HA is supported
        // this setting needs to be fixed. Domain type can be dev/ha/cluster and
        // this type needs to be extracted possibly using an api from installer


        // bnevins 12/20/12 -- I'm not touching this ancient getLogger call.
        // because it looks risky.
        ctx.setLogger(LogDomains.getLogger(
                DomainInitializer.class, LogDomains.SERVER_LOGGER));

        // now for every such Inhabitant, fetch the actual initial config and
        // insert it into the module that initial config was targeted for.
        ServiceLocator habitat = glassfish.getService(ServiceLocator.class);
View Full Code Here

Examples of org.glassfish.api.admin.config.DomainContext

        Config config = glassfish.getService(
                Config.class, serverConfig.getConfigRef());

        // Create a context object for this domain creation to enable the new
        // modules to make decisions
        DomainContext ctx = new DomainContext();
        ctx.setDomainType("dev"); //TODO : Whenever clustering/HA is supported
        // this setting needs to be fixed. Domain type can be dev/ha/cluster and
        // this type needs to be extracted possibly using an api from installer


        // bnevins 12/20/12 -- I'm not touching this ancient getLogger call.
        // because it looks risky.
        ctx.setLogger(LogDomains.getLogger(
                DomainInitializer.class, LogDomains.SERVER_LOGGER));

        // now for every such Inhabitant, fetch the actual initial config and
        // insert it into the module that initial config was targeted for.
        ServiceLocator habitat = glassfish.getService(ServiceLocator.class);
View Full Code Here

Examples of org.nxplanner.tags.DomainContext

        return loadedObject;
    }

    private void checkAuthorization(Object object, String permission)
            throws RepositoryException {
        DomainContext context = new DomainContext();
        try {
            context.populate(object);
            int objectIdentifier = ((Integer)PropertyUtils.getProperty(object, "id")).intValue();
            if (!SystemAuthorizer.get().hasPermission(context.getProjectId(),
                    SecurityHelper.getRemoteUserId(ThreadServletRequest.get()), object, permission)) {
                throw new AuthorizationException("not authorized for object "+permission+": "+
                        objectClass+" "+objectIdentifier);
            }
        } catch (RuntimeException e) {
View Full Code Here

Examples of org.nxplanner.tags.DomainContext

    // Support Functions
    //

    private int getProjectId(Class containerClass, int containerId) throws Exception {
        Object object = ThreadSession.get().load(containerClass, new Integer(containerId));
        DomainContext context = new DomainContext();
        context.populate(object);
        return context.getProjectId();
    }
View Full Code Here

Examples of org.nxplanner.tags.DomainContext

        context.populate(object);
        return context.getProjectId();
    }

    private int getProjectId(Object object) throws Exception {
        DomainContext context = new DomainContext();
        context.populate(object);
        return context.getProjectId();
    }
View Full Code Here

Examples of org.nxplanner.tags.DomainContext

            }
        });
    }

    public void setUpDomainContext() {
        DomainContext context = new DomainContext();
        context.setProjectId(10);
        context.save(request);
    }
View Full Code Here

Examples of org.nxplanner.tags.DomainContext

        }
    }

    protected DomainContext setDomainContext(HttpServletRequest request, Object object)
            throws Exception {
        DomainContext domainContext = DomainContext.get(request);
        if (domainContext != null) {
            return domainContext;
        }
        domainContext = new DomainContext();
        domainContext.populate(object);
        String projectIdParam = request.getParameter("projectId");
        if (domainContext.getProjectId() == 0 && StringUtils.isNotEmpty(projectIdParam) && !projectIdParam.equals("0")) {
            ObjectRepository objectRepository = getRepository(Project.class);
            Project project = (Project)objectRepository.load(Integer.parseInt((request.getParameter("projectId"))));
            domainContext.populate(project);
        }
        domainContext.save(request);
        return domainContext;
    }
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.