- if(dictionaryName.startsWith(DisctionaryNames.Attribute.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.ActionPolicyDictionary.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.OnapName.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.MSPolicyDictionary.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.VNFType.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.VSCLAction.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.ClosedLoopService.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.ClosedLoopSite.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.PEPOptions.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.VarbindDictionary.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.BRMSParamDictionary.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.BRMSControllerDictionary.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.BRMSDependencyDictionary.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.Settings.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.PrefixList.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.SecurityZone.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.Zone.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.ServiceList.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.ServiceGroup.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.AddressGroup.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.ProtocolList.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.ActionList.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.TermList.toString())){
- return true;
- }
- if(dictionaryName.startsWith(DisctionaryNames.SearchCriteria.toString())){
- return true;
- }
- return false;
+ String nameCheck = dictionaryName.replace(".csv", "");
+ try{
+ DictionaryNames mode = DictionaryNames.valueOf(nameCheck);
+ switch (mode){
+ case Attribute:
+ case ActionPolicyDictionary:
+ case OnapName:
+ case MSPolicyDictionary:
+ case VNFType:
+ case VSCLAction:
+ case ClosedLoopService:
+ case ClosedLoopSite:
+ case PEPOptions:
+ case VarbindDictionary:
+ case BRMSParamDictionary:
+ case BRMSControllerDictionary:
+ case BRMSDependencyDictionary:
+ case Settings:
+ case PrefixList:
+ case SecurityZone:
+ case Zone:
+ case ServiceList:
+ case ServiceGroup:
+ case AddressGroup:
+ case ProtocolList:
+ case ActionList:
+ case TermList:
+ case SearchCriteria:
+ return true;
+ default:
+ return false;
+ }
+ }catch(Exception e){
+ LOGGER.error("Dictionary not exits: " +dictionaryName +e);
+ return false;
+ }