All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fabric3.policy.NullPolicyResult Maven / Gradle / Ivy

The newest version!
/*
 * Fabric3
 * Copyright (c) 2009-2015 Metaform Systems
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.fabric3.policy;

import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.fabric3.api.model.type.definitions.Intent;
import org.fabric3.api.model.type.definitions.PolicySet;
import org.fabric3.spi.domain.generator.policy.EffectivePolicy;
import org.fabric3.spi.domain.generator.policy.PolicyMetadata;
import org.fabric3.spi.domain.generator.policy.PolicyResult;
import org.fabric3.spi.model.instance.LogicalOperation;

/**
 * Used as a policy result stub.
 */
public class NullPolicyResult implements PolicyResult, EffectivePolicy {
    private PolicyMetadata metadata = new PolicyMetadata();

    public List getInterceptedPolicySets(LogicalOperation operation) {
        return Collections.emptyList();
    }

    public Map getMetadata() {
        return Collections.emptyMap();
    }

    public EffectivePolicy getSourcePolicy() {
        return this;
    }

    public EffectivePolicy getTargetPolicy() {
        return this;
    }

    public Set getInterceptedEndpointPolicySets() {
        return Collections.emptySet();
    }

    public Map> getInterceptedPolicySets() {
        return Collections.emptyMap();
    }

    public PolicyMetadata getMetadata(LogicalOperation operation) {
        return metadata;
    }

    public Set getProvidedEndpointIntents() {
        return Collections.emptySet();
    }

    public Set getAggregatedEndpointIntents() {
        return Collections.emptySet();
    }

    public Set getEndpointPolicySets() {
        return Collections.emptySet();
    }

    public List getIntents(LogicalOperation operation) {
        return Collections.emptyList();
    }

    public List getPolicySets(LogicalOperation operation) {
        return Collections.emptyList();
    }

    public List getOperationIntents() {
        return Collections.emptyList();
    }

    public Map> getOperationPolicySets() {
        return Collections.emptyMap();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy