+++ /dev/null
-/*******************************************************************************\r
- * ============LICENSE_START====================================================\r
- * * org.onap.aaf\r
- * * ===========================================================================\r
- * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
- * * ===========================================================================\r
- * * Licensed under the Apache License, Version 2.0 (the "License");\r
- * * you may not use this file except in compliance with the License.\r
- * * You may obtain a copy of the License at\r
- * * \r
- * * http://www.apache.org/licenses/LICENSE-2.0\r
- * * \r
- * * Unless required by applicable law or agreed to in writing, software\r
- * * distributed under the License is distributed on an "AS IS" BASIS,\r
- * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * * See the License for the specific language governing permissions and\r
- * * limitations under the License.\r
- * * ============LICENSE_END====================================================\r
- * *\r
- * * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
- * *\r
- ******************************************************************************/\r
-package org.onap.aaf.authz.common;\r
-\r
-import org.onap.aaf.cadi.CadiException;\r
-import org.onap.aaf.cadi.config.Config;\r
-import org.onap.aaf.inno.env.Env;\r
-\r
-public class Define {\r
- public static String ROOT_NS="org.openecomp";\r
- public static String ROOT_COMPANY=ROOT_NS;\r
-\r
- public static void set(Env env) throws CadiException {\r
- ROOT_NS = env.getProperty(Config.AAF_ROOT_NS);\r
- if(ROOT_NS==null) {\r
- throw new CadiException(Config.AAF_ROOT_NS + " property is required.");\r
- }\r
- ROOT_COMPANY = env.getProperty(Config.AAF_ROOT_COMPANY);\r
- if(ROOT_COMPANY==null) {\r
- int last = ROOT_NS.lastIndexOf('.');\r
- if(last>=0) {\r
- ROOT_COMPANY = ROOT_NS.substring(0, last);\r
- } else {\r
- throw new CadiException(Config.AAF_ROOT_COMPANY + " or " + Config.AAF_ROOT_NS + " property with 3 positions is required.");\r
- }\r
- }\r
- env.init().log("AAF Root NS is " + ROOT_NS + ", and AAF Root Company is " +ROOT_COMPANY);\r
- }\r
- \r
-}\r