001/*******************************************************************************
002 * Copyright 2017 The MIT Internet Trust Consortium
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *   http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *******************************************************************************/
016
017package org.mitre.uma.model;
018
019import java.util.Collection;
020
021/**
022 * Data shuttle to return results of the claims processing service.
023 *
024 * @author jricher
025 *
026 */
027public class ClaimProcessingResult {
028
029        private boolean satisfied;
030        private Collection<Claim> unmatched;
031        private Policy matched;
032
033        /**
034         * Create an unmatched result. isSatisfied is false.
035         * @param unmatched
036         */
037        public ClaimProcessingResult(Collection<Claim> unmatched) {
038                this.satisfied = false;
039                this.unmatched = unmatched;
040                this.matched = null;
041        }
042
043        /**
044         * Create a matched result. isSatisfied is true.
045         * @param matched
046         */
047        public ClaimProcessingResult(Policy matched) {
048                this.satisfied = true;
049                this.matched = matched;
050                this.unmatched = null;
051        }
052
053        /**
054         * @return the satisfied
055         */
056        public boolean isSatisfied() {
057                return satisfied;
058        }
059
060        /**
061         * @param satisfied the satisfied to set
062         */
063        public void setSatisfied(boolean satisfied) {
064                this.satisfied = satisfied;
065        }
066
067        /**
068         * @return the unmatched
069         */
070        public Collection<Claim> getUnmatched() {
071                return unmatched;
072        }
073
074        /**
075         * @param unmatched the unmatched to set
076         */
077        public void setUnmatched(Collection<Claim> unmatched) {
078                this.unmatched = unmatched;
079        }
080
081        /**
082         * @return the matched
083         */
084        public Policy getMatched() {
085                return matched;
086        }
087
088        /**
089         * @param matched the matched to set
090         */
091        public void setMatched(Policy matched) {
092                this.matched = matched;
093        }
094
095}