Work
This commit is contained in:
Nicolas Héron 2025-02-21 09:20:13 +01:00
commit e4b31838f4
12 changed files with 149 additions and 136 deletions

View file

@ -1,7 +0,0 @@
package org.chtijbug.drools.common;
public class KafkaTopicConstants {
public final static String LOGING_TOPIC ="logging";
public final static String RESPONSE_DEPLOY_TOPIC ="ResponseDeploy";
public final static String REVERSE_PROXY="proxy";
}

View file

@ -1,52 +0,0 @@
/*
* Copyright 2014 Pymma Software
*
* 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.
*/
package org.chtijbug.drools.common.date;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Created by IntelliJ IDEA.
* Date: 04/06/13
* Time: 16:38
* To change this template use File | Settings | File Templates.
*/
public class DateHelper {
public static String sFormat = "yyyy-MM-dd";
public static Date getDate(String sDate) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat(sFormat);
return sdf.parse(sDate);
}
public static Date getDate(String sDate, String anotherFormat)
throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat(anotherFormat);
return sdf.parse(sDate);
}
public static String getDate(Date date) {
SimpleDateFormat sdf = new SimpleDateFormat(sFormat);
String formatedDate = sdf.format(date);
return formatedDate;
}
public static String getDate(Date date, String anotherFormat) {
SimpleDateFormat sdf = new SimpleDateFormat(anotherFormat);
String formatedDate = sdf.format(date);
return formatedDate;
}
}

View file

@ -1,5 +0,0 @@
package org.chtijbug.drools.common.rest;
public class Constants {
public final static String AUTHORISATION_HEADER = "Authorization";
}

View file

@ -1,26 +0,0 @@
package org.chtijbug.drools.common.rest;
public class InputElement {
private String jsonInput;
private String className;
public String getJsonInput() {
return jsonInput;
}
public void setJsonInput(String jsonInput) {
this.jsonInput = jsonInput;
}
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
}

View file

@ -1,16 +0,0 @@
package org.chtijbug.drools.common.rest;
import java.util.List;
public class MultipleInputs {
private List<InputElement> inputElementList;
public List<InputElement> getInputElementList() {
return inputElementList;
}
public void setInputElementList(List<InputElement> inputElementList) {
this.inputElementList = inputElementList;
}
}

View file

@ -0,0 +1,31 @@
package org.chtijbug.drools.common.date
import java.text.SimpleDateFormat
import java.util.*
class DateHelper {
companion object {
var sFormat: String = "yyyy-MM-dd"
fun getDate(sDate: String?): Date {
val sdf = SimpleDateFormat(sFormat)
return sdf.parse(sDate)
}
fun getDate(sDate: String?, anotherFormat: String): Date {
val sdf = SimpleDateFormat(anotherFormat)
return sdf.parse(sDate)
}
fun getDate(date: Date?): String {
val sdf = SimpleDateFormat(sFormat)
val formatedDate = sdf.format(date)
return formatedDate
}
fun getDate(date: Date?, anotherFormat: String): String {
val sdf = SimpleDateFormat(anotherFormat)
val formatedDate = sdf.format(date)
return formatedDate
}
}
}