01: /**
02: * Copyright (C) The MX4J Contributors.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the MX4J License version 1.0.
06: * See the terms of the MX4J License in the documentation provided with this software.
07: */package javax.management.relation;
08:
09: /**
10: * @version $Revision: 1.4 $
11: */
12: public class RoleStatus {
13: public static final int NO_ROLE_WITH_NAME = 1;
14: public static final int ROLE_NOT_READABLE = 2;
15: public static final int ROLE_NOT_WRITABLE = 3;
16: public static final int LESS_THAN_MIN_ROLE_DEGREE = 4;
17: public static final int MORE_THAN_MAX_ROLE_DEGREE = 5;
18: public static final int REF_MBEAN_OF_INCORRECT_CLASS = 6;
19: public static final int REF_MBEAN_NOT_REGISTERED = 7;
20:
21: public static boolean isRoleStatus(int roleStatusType) {
22: if (roleStatusType != NO_ROLE_WITH_NAME
23: && roleStatusType != ROLE_NOT_READABLE
24: && roleStatusType != ROLE_NOT_WRITABLE
25: && roleStatusType != LESS_THAN_MIN_ROLE_DEGREE
26: && roleStatusType != MORE_THAN_MAX_ROLE_DEGREE
27: && roleStatusType != REF_MBEAN_OF_INCORRECT_CLASS
28: && roleStatusType != REF_MBEAN_NOT_REGISTERED) {
29: return false;
30: }
31: return true;
32: }
33: }
|