01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */package org.apache.geronimo.corba.security.config;
17:
18: import org.omg.CSIIOP.CompositeDelegation;
19: import org.omg.CSIIOP.Confidentiality;
20: import org.omg.CSIIOP.DelegationByClient;
21: import org.omg.CSIIOP.DetectMisordering;
22: import org.omg.CSIIOP.DetectReplay;
23: import org.omg.CSIIOP.EstablishTrustInClient;
24: import org.omg.CSIIOP.EstablishTrustInTarget;
25: import org.omg.CSIIOP.IdentityAssertion;
26: import org.omg.CSIIOP.Integrity;
27: import org.omg.CSIIOP.NoDelegation;
28: import org.omg.CSIIOP.NoProtection;
29: import org.omg.CSIIOP.SimpleDelegation;
30:
31: /**
32: * @version $Revision: 451417 $ $Date: 2006-09-29 13:13:22 -0700 (Fri, 29 Sep 2006) $
33: */
34: public final class ConfigUtil {
35:
36: public static String flags(int flag) {
37: String result = "";
38:
39: if ((NoProtection.value & flag) != 0) {
40: result += "NoProtection ";
41: }
42: if ((Integrity.value & flag) != 0) {
43: result += "Integrity ";
44: }
45: if ((Confidentiality.value & flag) != 0) {
46: result += "Confidentiality ";
47: }
48: if ((DetectReplay.value & flag) != 0) {
49: result += "DetectReplay ";
50: }
51: if ((DetectMisordering.value & flag) != 0) {
52: result += "DetectMisordering ";
53: }
54: if ((EstablishTrustInTarget.value & flag) != 0) {
55: result += "EstablishTrustInTarget ";
56: }
57: if ((EstablishTrustInClient.value & flag) != 0) {
58: result += "EstablishTrustInClient ";
59: }
60: if ((NoDelegation.value & flag) != 0) {
61: result += "NoDelegation ";
62: }
63: if ((SimpleDelegation.value & flag) != 0) {
64: result += "SimpleDelegation ";
65: }
66: if ((CompositeDelegation.value & flag) != 0) {
67: result += "CompositeDelegation ";
68: }
69: if ((IdentityAssertion.value & flag) != 0) {
70: result += "IdentityAssertion ";
71: }
72: if ((DelegationByClient.value & flag) != 0) {
73: result += "DelegationByClient ";
74: }
75:
76: return result;
77: }
78: }
|