Examples of RuntimeProject


Examples of com.volantis.mcs.runtime.RuntimeProject

     *                 exception is thrown. If this is null then no checking is
     *                 performed.
     * @return The project that was popped off the stack.
     */
    public RuntimeProject popProject(RuntimeProject expected) {
        final RuntimeProject popped;

        try {
            popped = (RuntimeProject) stack.pop();
        } catch (EmptyStackException ese) {
            throw new IllegalStateException("The project stack is empty, " +
View Full Code Here

Examples of com.volantis.mcs.runtime.RuntimeProject

                                          String name)
            throws RepositoryException {

        ActivatedPolicy policy = null;

        RuntimeProject actualProject = logicalProject;

        // Only fallback if the name is project relative.
        boolean supportFallback = name.startsWith("/");

        // Iterate over the project and its fallbacks.
        boolean finished = false;
        for (; !finished && policy == null && actualProject != null;
             actualProject = actualProject.getBaseProject()) {

            // This iteration is the last one if fallbacks are not being
            // performed.
            finished = !supportFallback;

            // Look for the policy in the actual project, if it is found
            // then it is treated as if it belonged to the logical project.
            PolicyBuilderReader reader = actualProject.getPolicyBuilderReader();

            // Try and get the response, may be null.
            PolicyBuilderResponse response =
                    reader.getPolicyBuilder(actualProject, name);
            if (response == null) {
                // No response from reader so try next one.
                continue;
            }

            // If the logical project is the global project then it
            // maybe that the policy is actually in a different project
            // but the request was deferred until now in order to allow
            // the project identification to be combined with retrieval
            // of the policy in order to save time on the server.
            RuntimeProject responseProject = (RuntimeProject)
                    response.getProject();
            if (responseProject != actualProject) {
                RuntimeProject global = projectManager.getGlobalProject();
                if (actualProject == global && logicalProject == global) {
                    actualProject = responseProject;
                    logicalProject = responseProject;
                } else {
                    // The project can change only if the policy is remote and
View Full Code Here

Examples of com.volantis.mcs.runtime.RuntimeProject

        if (assetGroupName == null) {
            return null;
        }

        // Get the project for the asset group.
        RuntimeProject project = (RuntimeProject) sAsset.getAssetGroupProject();
        if (project == null) {
            // If the project could not be found then use the project for the
            // asset.
            project = (RuntimeProject) sAsset.getProject();
View Full Code Here

Examples of com.volantis.mcs.runtime.RuntimeProject

        builder.setPolicySource(policySourceFactory.createRemotePolicySource(
                ""));
        builder.setCacheControlDefaultsMap(remoteConstraintsMap);
        builder.setRemote(true);
        builder.setContainsOrphans(true);
        RuntimeProject project = builder.getProject();
        return project;
    }
View Full Code Here

Examples of com.volantis.mcs.runtime.RuntimeProject

            builder.setName(name);

            initialiseProjectBuilder(configuration, dependencyPath, builder, namedProjects);

            // Add the configuration to the map
            RuntimeProject predefined = builder.getProject();
            namedProjects.put(name, predefined);

            return predefined;
        }
View Full Code Here

Examples of com.volantis.mcs.runtime.RuntimeProject

                RuntimeProjectConfiguration configuration, List dependencyPath,
                RuntimeProjectBuilder builder,
                final Map namedProjects)
                throws ConfigurationException {

            RuntimeProject fallbackProject = getFallbackProject(configuration,
                    dependencyPath, namedProjects);
            builder.setBaseProject(fallbackProject);

            // Initialise the policy source.
            AbstractPoliciesConfiguration policies = configuration.getPolicies();
View Full Code Here

Examples of com.volantis.mcs.runtime.RuntimeProject

                RuntimeProjectConfiguration configuration, List dependencyPath,
                final Map namedProjects)
                throws ConfigurationException {


            RuntimeProject fallbackProject = null;
            String fallbackProjectName = configuration.getFallbackProjectName();
            if (fallbackProjectName != null) {
                RuntimeProjectConfiguration fallbackConfiguration =
                        (RuntimeProjectConfiguration) projectConfigurations.get(fallbackProjectName);
                if (fallbackConfiguration == null) {
View Full Code Here

Examples of com.volantis.mcs.runtime.RuntimeProject

                createProject(configuration, dependencyPath, namedProjects);
            }

            // Create the default project after the named ones as it may
            // fallback to one of them.
            RuntimeProject defaultProject = createDefaultProject(
                    defaultProjectConfiguration, namedProjects);

            return new PredefinedProjects(defaultProject, namedProjects);
        }
View Full Code Here

Examples of com.volantis.mcs.runtime.RuntimeProject

    }

    private RuntimePolicyReference evaluateRuntimePolicyExpression(
            RuntimePolicyReferenceExpression policyExpression) {
        Expression expression = policyExpression.getExpression();
        RuntimeProject project = (RuntimeProject) policyExpression.getProject();
        MarinerURL baseURL = policyExpression.getBaseURL();
        String brandName = policyExpression.getBrandName();

        RuntimePolicyReference reference = null;
        try {
View Full Code Here

Examples of com.volantis.mcs.runtime.RuntimeProject

    }

    // Javadoc inherited.
    public ActivatedPolicy fetchPolicy(RuntimePolicyReference reference) {

        RuntimeProject project = (RuntimeProject) reference.getProject();
        String name = reference.getName();
        PolicyType expectedPolicyType = reference.getExpectedPolicyType();

        ActivatedPolicy policy = null;
        try {
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.