Adding more testcases to Misc xgen
[aaf/authz.git] / misc / xgen / src / main / java / org / onap / aaf / misc / xgen / html / Imports.java
index 90e8260..fa51719 100644 (file)
@@ -1,98 +1,98 @@
-/**
- * ============LICENSE_START====================================================
- * org.onap.aaf
- * ===========================================================================
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
- * ===========================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END====================================================
- *
- */
-
-package org.onap.aaf.misc.xgen.html;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class Imports implements Thematic{
-       List<String> css,js;
-       public final int backdots;
-//     public final File webDir;
-       private String theme;
-       
-       public Imports(int backdots) {
-//             this.webDir = webDir;
-               
-               css = new ArrayList<String>();
-               js = new ArrayList<String>();
-               this.backdots = backdots;
-               theme = "";
-       }
-       
-       public Imports css(String str) {
-               css.add(str);
-               return this;
-       }
-       
-       public Imports js(String str) {
-               js.add(str);
-               return this;
-       }
-
-       public Imports theme(String str) {
-               theme = str==null?"":str;
-               return this;
-       }
-
-       /**
-        * Pass in a possible Theme.  If it is "" or null, it will resolve to default Theme set in Imports
-        * 
-        * @param theTheme
-        * @return
-        */
-       @Override
-       public String themePath(String theTheme) {
-               StringBuilder src = dots(new StringBuilder());
-               if(theTheme==null||theTheme.length()==0) {
-                       src.append(theme);
-                       if(theme.length()>0)src.append('/');
-               } else {
-                       src.append(theTheme);
-                       src.append('/');
-               }
-
-               return src.toString();
-       }
-       
-       /**
-        * Pass in a possible Theme.  If it is "" or null, it will resolve to default Theme set in Imports
-        * 
-        * @param theTheme
-        * @return
-        */
-       @Override
-       public String themeResolve(String theTheme) {
-               return (theTheme==null||theTheme.length()==0)
-                       ?theme
-                       :theTheme;
-       }
-
-       public StringBuilder dots(StringBuilder src) {
-               for(int i=0;i<backdots;++i) {
-                       src.append("../");
-               }
-               return src;
-       }
-       
-};
-
+/**\r
+ * ============LICENSE_START====================================================\r
+ * org.onap.aaf\r
+ * ===========================================================================\r
+ * Copyright (c) 2018 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
+ */\r
+\r
+package org.onap.aaf.misc.xgen.html;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+public class Imports implements Thematic{\r
+       List<String> css,js;\r
+       public final int backdots;\r
+//     public final File webDir;\r
+       private String theme;\r
+       \r
+       public Imports(int backdots) {\r
+//             this.webDir = webDir;\r
+               \r
+               css = new ArrayList<String>();\r
+               js = new ArrayList<String>();\r
+               this.backdots = backdots;\r
+               theme = "";\r
+       }\r
+       \r
+       public Imports css(String str) {\r
+               css.add(str);\r
+               return this;\r
+       }\r
+       \r
+       public Imports js(String str) {\r
+               js.add(str);\r
+               return this;\r
+       }\r
+\r
+       public Imports theme(String str) {\r
+               theme = str==null?"":str;\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * Pass in a possible Theme.  If it is "" or null, it will resolve to default Theme set in Imports\r
+        * \r
+        * @param theTheme\r
+        * @return\r
+        */\r
+       @Override\r
+       public String themePath(String theTheme) {\r
+               StringBuilder src = dots(new StringBuilder());\r
+               if(theTheme==null||theTheme.length()==0) {\r
+                       src.append(theme);\r
+                       if(theme.length()>0)src.append('/');\r
+               } else {\r
+                       src.append(theTheme);\r
+                       src.append('/');\r
+               }\r
+\r
+               return src.toString();\r
+       }\r
+       \r
+       /**\r
+        * Pass in a possible Theme.  If it is "" or null, it will resolve to default Theme set in Imports\r
+        * \r
+        * @param theTheme\r
+        * @return\r
+        */\r
+       @Override\r
+       public String themeResolve(String theTheme) {\r
+               return (theTheme==null||theTheme.length()==0)\r
+                       ?theme\r
+                       :theTheme;\r
+       }\r
+\r
+       public StringBuilder dots(StringBuilder src) {\r
+               for(int i=0;i<backdots;++i) {\r
+                       src.append("../");\r
+               }\r
+               return src;\r
+       }\r
+       \r
+};\r
+\r