001: /**
002: * Licensed to the Apache Software Foundation (ASF) under one
003: * or more contributor license agreements. See the NOTICE file
004: * distributed with this work for additional information
005: * regarding copyright ownership. The ASF licenses this file
006: * to you under the Apache License, Version 2.0 (the
007: * "License"); you may not use this file except in compliance
008: * with the License. You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing,
013: * software distributed under the License is distributed on an
014: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015: * KIND, either express or implied. See the License for the
016: * specific language governing permissions and limitations
017: * under the License.
018: */package org.apache.cxf.ws.policy;
019:
020: import java.util.Collection;
021:
022: import org.apache.cxf.service.model.BindingFaultInfo;
023: import org.apache.cxf.service.model.BindingOperationInfo;
024: import org.apache.cxf.service.model.EndpointInfo;
025: import org.apache.cxf.transport.Conduit;
026: import org.apache.cxf.transport.Destination;
027: import org.apache.neethi.Assertion;
028: import org.apache.neethi.PolicyRegistry;
029:
030: /**
031: *
032: */
033: public interface PolicyEngine {
034:
035: // configuration
036:
037: boolean isEnabled();
038:
039: void setEnabled(boolean e);
040:
041: AlternativeSelector getAlternativeSelector();
042:
043: void setAlternativeSelector(AlternativeSelector selector);
044:
045: boolean isIgnoreUnknownAssertions();
046:
047: void setIgnoreUnknownAssertions(boolean ignoreUnknownAssertions);
048:
049: //
050:
051: boolean supportsAlternative(Collection<Assertion> alterative,
052: Assertor assertor);
053:
054: // available throughout the outbound path
055:
056: EffectivePolicy getEffectiveClientRequestPolicy(EndpointInfo ei,
057: BindingOperationInfo boi, Conduit c);
058:
059: void setEffectiveClientRequestPolicy(EndpointInfo ei,
060: BindingOperationInfo boi, EffectivePolicy ep);
061:
062: EffectivePolicy getEffectiveServerResponsePolicy(EndpointInfo ei,
063: BindingOperationInfo boi, Destination d);
064:
065: void setEffectiveServerResponsePolicy(EndpointInfo ei,
066: BindingOperationInfo boi, EffectivePolicy ep);
067:
068: EffectivePolicy getEffectiveServerFaultPolicy(EndpointInfo ei,
069: BindingFaultInfo bfi, Destination d);
070:
071: void setEffectiveServerFaultPolicy(EndpointInfo ei,
072: BindingFaultInfo bfi, EffectivePolicy ep);
073:
074: // available throughout the inbound path
075:
076: EndpointPolicy getClientEndpointPolicy(EndpointInfo ei,
077: Conduit conduit);
078:
079: EndpointPolicy getServerEndpointPolicy(EndpointInfo ei,
080: Destination destination);
081:
082: void setEndpointPolicy(EndpointInfo ei, EndpointPolicy ep);
083:
084: // only available after message type has been determined
085:
086: EffectivePolicy getEffectiveServerRequestPolicy(EndpointInfo ei,
087: BindingOperationInfo boi);
088:
089: void setEffectiveServerRequestPolicy(EndpointInfo ei,
090: BindingOperationInfo boi, EffectivePolicy ep);
091:
092: EffectivePolicy getEffectiveClientResponsePolicy(EndpointInfo ei,
093: BindingOperationInfo boi);
094:
095: void setEffectiveClientResponsePolicy(EndpointInfo ei,
096: BindingOperationInfo boi, EffectivePolicy ep);
097:
098: EffectivePolicy getEffectiveClientFaultPolicy(EndpointInfo ei,
099: BindingFaultInfo bfi);
100:
101: void setEffectiveClientFaultPolicy(EndpointInfo ei,
102: BindingFaultInfo bfi, EffectivePolicy ep);
103:
104: PolicyRegistry getRegistry();
105:
106: }
|