001: /*
002: * The contents of this file are subject to the terms
003: * of the Common Development and Distribution License
004: * (the License). You may not use this file except in
005: * compliance with the License.
006: *
007: * You can obtain a copy of the license at
008: * https://glassfish.dev.java.net/public/CDDLv1.0.html.
009: * See the License for the specific language governing
010: * permissions and limitations under the License.
011: *
012: * When distributing Covered Code, include this CDDL
013: * Header Notice in each file and include the License file
014: * at https://glassfish.dev.java.net/public/CDDLv1.0.html.
015: * If applicable, add the following below the CDDL Header,
016: * with the fields enclosed by brackets [] replaced by
017: * you own identifying information:
018: * "Portions Copyrighted [year] [name of copyright owner]"
019: *
020: * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
021: */
022:
023: package com.sun.xml.ws.security.opt.impl.incoming;
024:
025: import com.sun.xml.ws.api.message.HeaderList;
026: import com.sun.xml.wss.ProcessingContext;
027: import com.sun.xml.wss.impl.policy.MLSPolicy;
028:
029: import java.util.ArrayList;
030: import java.util.HashMap;
031:
032: /**
033: *
034: * @author K.Venugopal@sun.com
035: */
036: public class SecurityContext {
037:
038: private ArrayList processedSecurityHeaders = new ArrayList(2);
039: private ArrayList bufferedSecurityHeaders = null;
040: private HeaderList nonSecurityHeaders = null;
041: private HashMap<String, String> shND = null;
042: private HashMap<String, String> envND = null;
043:
044: private MLSPolicy inferredKB = null;
045:
046: private ProcessingContext pc = null;
047:
048: private boolean isSAMLKB = false;
049:
050: /** Creates a new instance of SecurityContext */
051: public SecurityContext() {
052:
053: }
054:
055: public MLSPolicy getInferredKB() {
056: return inferredKB;
057: }
058:
059: public void setInferredKB(MLSPolicy inferredKB) {
060: this .inferredKB = inferredKB;
061: }
062:
063: public void setProcessedSecurityHeaders(ArrayList headers) {
064: this .processedSecurityHeaders = headers;
065: }
066:
067: public ArrayList getProcessedSecurityHeaders() {
068: return processedSecurityHeaders;
069: }
070:
071: public void setBufferedSecurityHeaders(ArrayList headers) {
072: this .bufferedSecurityHeaders = headers;
073: }
074:
075: public ArrayList getBufferedSecurityHeaders() {
076: return bufferedSecurityHeaders;
077: }
078:
079: public HeaderList getNonSecurityHeaders() {
080: return nonSecurityHeaders;
081: }
082:
083: public void setNonSecurityHeaders(HeaderList list) {
084: this .nonSecurityHeaders = list;
085: }
086:
087: public void setSecurityHdrNSDecls(HashMap<String, String> nsDecls) {
088: this .shND = nsDecls;
089: }
090:
091: public HashMap<String, String> getSecurityHdrNSDecls() {
092: return this .shND;
093: }
094:
095: public void setSOAPEnvelopeNSDecls(HashMap<String, String> nsDecls) {
096: this .envND = nsDecls;
097: }
098:
099: public HashMap<String, String> getSOAPEnvelopeNSDecls() {
100: return envND;
101: }
102:
103: public ProcessingContext getProcessingContext() {
104: return pc;
105: }
106:
107: public void setProcessingContext(ProcessingContext pc) {
108: this .pc = pc;
109: }
110:
111: public void setIsSAMLKeyBinding(boolean flag) {
112: this .isSAMLKB = flag;
113: }
114:
115: public boolean getIsSAMLKeyBinding() {
116: return this.isSAMLKB;
117: }
118: }
|