/**
 * Copyright (c) 2016, German Neuroinformatics Node (G-Node)
 *
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted under the terms of the BSD License. See
 * LICENSE file in the root of the Project.
 */

package org.g_node.micro.commons;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * Class to provide utility methods to g-node microservice applications.
 *
 * @author Michael Sonntag (sonntag@bio.lmu.de)
 */
public class AppUtils {

    /**
     * Return time stamp formatted corresponding to input format pattern.
     * @param format Input format pattern.
     * @return Formatted timestamp.
     */
    public static String getTimeStamp(final String format) {
        return LocalDateTime.now().format(DateTimeFormatter.ofPattern(format));
    }

}

@@ -387,16 +387,153 @@
 rmatter;
+%0Aimport java.util.List;%0Aimport java.util.Locale;%0Aimport java.util.stream.Collectors;%0A%0Aimport org.apache.commons.codec.digest.DigestUtils;
 %0A%0A/**%0A *
@@ -1000,10 +1000,643 @@
 %0A    %7D%0A%0A
+    /**%0A     * Method converts a List of Strings to upper case, joins the individual entries by a blank space%0A     * and retrieves a hexadecimal String from the resulting input String using the SHA-1 hash algorithm.%0A     * @param valueList List of Strings.%0A     * @return Hexadecimal String of the SHA-1 encoded input Strings.%0A     */%0A    public static String getHashSHA(final List%3CString%3E valueList) %7B%0A        final String collectListValues = valueList.stream()%0A                .map(s -%3E s.toUpperCase(Locale.ENGLISH))%0A                .collect(Collectors.joining(%22 %22));%0A%0A        return DigestUtils.shaHex(collectListValues);%0A    %7D%0A%0A
 %7D%0A

add commons hash method