1 23 24 29 package com.sun.enterprise.admin.dottedname.valueaccessor; 30 31 import javax.management.MBeanServerConnection ; 32 public class PrefixedValueSupport 33 { 34 PropertyValueAccessorBase[] accessors = null; 35 36 public PrefixedValueSupport(MBeanServerConnection conn) 37 { 38 accessors = new PropertyValueAccessorBase[]{ 39 new PropertyValueAccessor(conn), new SystemPropertyValueAccessor(conn) }; 42 } 43 44 public boolean isPrefixedValueDottedName(String dottedName) 45 { 46 if(getPrefixedValueAccessor(dottedName)!=null) 47 return true; 48 return false; 49 } 50 51 public String getPrefixedValueName(String dottedName) 52 { 53 return getPrefixedValueName(dottedName, false); 54 } 55 56 public String getPrefixedValueName(String dottedName, boolean bIncludingPrefix) 57 { 58 PropertyValueAccessorBase acc; 59 if((acc=getPrefixedValueAccessor(dottedName))!=null) 60 return acc.extractPrefixedValueName(dottedName, bIncludingPrefix); 61 return null; 62 } 63 64 public PropertyValueAccessorBase getPrefixedValueAccessor(String dottedName) 65 { 66 for(int i=0; i<accessors.length; i++) 67 if(accessors[i].isDottedNameForAccessor(dottedName)) 68 return accessors[i]; 69 return null; 70 } 71 72 } 73 74 75 | Popular Tags |