diff options
author | highstreetherbert <herbert.eiselt@highstreet-technologies.com> | 2020-07-10 15:45:17 +0200 |
---|---|---|
committer | highstreetherbert <herbert.eiselt@highstreet-technologies.com> | 2020-07-10 15:54:38 +0200 |
commit | 1ff1a1d0853e63978cea54fea79da0db6f35097e (patch) | |
tree | 31b439ac93af7fad29c4d0c4adfa70dc4fbec6e6 /sdnr/wt/helpserver/provider/src/main | |
parent | 23c27ddcd79913d11eac16eb42c5a43899de97a1 (diff) |
Reformat sdnr helpserver to ONAP code style
Reformat to ONAP code style
Issue-ID: SDNC-1273
Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Change-Id: I1904961694fad3b8ba03d6e452ffa579b803bac6
Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/helpserver/provider/src/main')
3 files changed, 28 insertions, 30 deletions
diff --git a/sdnr/wt/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/HelpServlet.java b/sdnr/wt/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/HelpServlet.java index f91e96b79..683311e8a 100644 --- a/sdnr/wt/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/HelpServlet.java +++ b/sdnr/wt/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/HelpServlet.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.helpserver; import java.io.BufferedReader; @@ -65,7 +65,7 @@ public class HelpServlet extends HttpServlet implements AutoCloseable { resp.addHeader("Access-Control-Allow-Methods", "OPTIONS, HEAD, GET, POST, PUT, DELETE"); resp.addHeader("Access-Control-Allow-Headers", "X-Requested-With, Content-Type, Content-Length"); if (query != null && query.contains("meta")) { - + File f = new File(HelpInfrastructureObject.KARAFHELPDIRECTORY, "meta.json"); if (f.exists()) { LOG.debug("found local meta file"); @@ -114,19 +114,19 @@ public class HelpServlet extends HttpServlet implements AutoCloseable { } LOG.debug("delivering file"); OutputStream out = resp.getOutputStream(); -// if (this.isTextFile(f) && REDIRECT_LINKS) { -// String line; -// try (BufferedReader br = new BufferedReader(new FileReader(f))) { -// line = br.readLine(); -// while (line != null) { -// out.write((line + "\n").getBytes()); -// line = br.readLine(); -// } -// out.flush(); -// out.close(); -// br.close(); -// } -// } else + // if (this.isTextFile(f) && REDIRECT_LINKS) { + // String line; + // try (BufferedReader br = new BufferedReader(new FileReader(f))) { + // line = br.readLine(); + // while (line != null) { + // out.write((line + "\n").getBytes()); + // line = br.readLine(); + // } + // out.flush(); + // out.close(); + // br.close(); + // } + // } else { try (FileInputStream in = new FileInputStream(f)) { diff --git a/sdnr/wt/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/data/ExtactBundleResource.java b/sdnr/wt/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/data/ExtactBundleResource.java index 975f8985b..ca3a40043 100644 --- a/sdnr/wt/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/data/ExtactBundleResource.java +++ b/sdnr/wt/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/data/ExtactBundleResource.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.helpserver.data; import java.io.File; @@ -29,16 +29,15 @@ import org.osgi.framework.Bundle; * Extract subtree with resources from Opendaylight/Karaf/OSGi bundle into Karaf directory<br> * * Reference: Eclipsezone @see - * <a href="https://www.eclipsezone.com/eclipse/forums/t101557.html">https://www.eclipszone.com</a> - * <br> + * <a href="https://www.eclipsezone.com/eclipse/forums/t101557.html">https://www.eclipszone.com</a> <br> * <br> - * Example for resource and directory path from karaf log. write resource: help/FAQ/0.4.0/README.md - * Create directories for: data/cache/com.highstreet.technologies.help/help/FAQ/0.4.0/README.md Open - * the file: data/cache/com.highstreet.technologies.help/help/FAQ/0.4.0/README.md Problem: Binary, - * JPG files => do not use buffer related functions + * Example for resource and directory path from karaf log. write resource: help/FAQ/0.4.0/README.md Create directories + * for: data/cache/com.highstreet.technologies.help/help/FAQ/0.4.0/README.md Open the file: + * data/cache/com.highstreet.technologies.help/help/FAQ/0.4.0/README.md Problem: Binary, JPG files => do not use buffer + * related functions * - * Hint: Verify with file manager the content of the bundle.jar file to see the location of the - * resources. There is no need to mark them via the classpath. + * Hint: Verify with file manager the content of the bundle.jar file to see the location of the resources. There is no + * need to mark them via the classpath. */ public class ExtactBundleResource { @@ -47,8 +46,7 @@ public class ExtactBundleResource { * Extract resources from Karaf/OSGi bundle into karaf directory structure. * * @param bundle Karaf/OSGi bundle with resources - * @param filePrefix prefix in karaf file system for destination e.g. - * "data/cache/com.highstreet.technologies." + * @param filePrefix prefix in karaf file system for destination e.g. "data/cache/com.highstreet.technologies." * @param ressoureRoot root name of ressources, with leading "/". e.g. "/help" * @throws IOException In case of problems. */ diff --git a/sdnr/wt/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/data/HelpInfrastructureObject.java b/sdnr/wt/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/data/HelpInfrastructureObject.java index 2c79645f1..ebf11b6af 100644 --- a/sdnr/wt/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/data/HelpInfrastructureObject.java +++ b/sdnr/wt/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/data/HelpInfrastructureObject.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.helpserver.data; import java.io.File; |