/protocols/ss7/map/map-api/src/main/java/org/mobicents/protocols/ss7/map/api/errors/UnauthorizedLCSClientDiagnostic.java
Java | 89 lines | 40 code | 8 blank | 41 comment | 1 complexity | 8091db64ceab6c49d300fa3908e65e88 MD5 | raw file
1/* 2 * JBoss, Home of Professional Open Source 3 * Copyright 2011, Red Hat, Inc. and individual contributors 4 * by the @authors tag. See the copyright.txt in the distribution for a 5 * full listing of individual contributors. 6 * 7 * This is free software; you can redistribute it and/or modify it 8 * under the terms of the GNU Lesser General Public License as 9 * published by the Free Software Foundation; either version 2.1 of 10 * the License, or (at your option) any later version. 11 * 12 * This software is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this software; if not, write to the Free 19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 */ 22 23package org.mobicents.protocols.ss7.map.api.errors; 24 25/** 26* 27* UnauthorizedLCSClient-Diagnostic ::= ENUMERATED { 28* noAdditionalInformation (0), 29* clientNotInMSPrivacyExceptionList (1), 30* callToClientNotSetup (2), 31* privacyOverrideNotApplicable (3), 32* disallowedByLocalRegulatoryRequirements (4), 33* ..., 34* unauthorizedPrivacyClass (5), 35* unauthorizedCallSessionUnrelatedExternalClient (6), 36* unauthorizedCallSessionRelatedExternalClient (7) } 37* -- exception handling: 38* -- any unrecognized value shall be ignored 39* 40* 41* 42* @author sergey vetyutnev 43* 44*/ 45public enum UnauthorizedLCSClientDiagnostic { 46 noAdditionalInformation (0), 47 clientNotInMSPrivacyExceptionList (1), 48 callToClientNotSetup (2), 49 privacyOverrideNotApplicable (3), 50 disallowedByLocalRegulatoryRequirements (4), 51 unauthorizedPrivacyClass (5), 52 unauthorizedCallSessionUnrelatedExternalClient (6), 53 unauthorizedCallSessionRelatedExternalClient (7); 54 55 private int code; 56 57 private UnauthorizedLCSClientDiagnostic(int code) { 58 this.code = code; 59 } 60 61 62 public int getCode() { 63 return code; 64 } 65 66 public static UnauthorizedLCSClientDiagnostic getInstance(int code) { 67 switch (code) { 68 case 0: 69 return noAdditionalInformation; 70 case 1: 71 return clientNotInMSPrivacyExceptionList; 72 case 2: 73 return callToClientNotSetup; 74 case 3: 75 return privacyOverrideNotApplicable; 76 case 4: 77 return disallowedByLocalRegulatoryRequirements; 78 case 5: 79 return unauthorizedPrivacyClass; 80 case 6: 81 return unauthorizedCallSessionUnrelatedExternalClient; 82 case 7: 83 return unauthorizedCallSessionRelatedExternalClient; 84 default: 85 return null; 86 } 87 } 88 89}