diff --git a/org.adempiere.base.process/src/org/adempiere/process/UpdateRoleMenu.java b/org.adempiere.base.process/src/org/adempiere/process/UpdateRoleMenu.java
index fb34afe72f..9778ef8e9d 100644
--- a/org.adempiere.base.process/src/org/adempiere/process/UpdateRoleMenu.java
+++ b/org.adempiere.base.process/src/org/adempiere/process/UpdateRoleMenu.java
@@ -11,6 +11,7 @@ import org.compiere.process.SvrProcess;
import org.compiere.util.DB;
@org.adempiere.base.annotation.Process
+@Deprecated
public class UpdateRoleMenu extends SvrProcess
{
private int p_role_id = 0;
diff --git a/org.adempiere.base.process/src/org/compiere/process/DistributionCreate.java b/org.adempiere.base.process/src/org/compiere/process/DistributionCreate.java
index 4e8566582b..517a4ed170 100644
--- a/org.adempiere.base.process/src/org/compiere/process/DistributionCreate.java
+++ b/org.adempiere.base.process/src/org/compiere/process/DistributionCreate.java
@@ -30,7 +30,8 @@ import org.compiere.model.MProduct;
import org.compiere.util.Env;
/**
- * Create Distribution List Order
+ * Create Distribution List Order.
+ * Note: feature not fully implemented and have been marked as inactive in application dictionary.
*
* @author Jorg Janke
* @version $Id: DistributionCreate.java,v 1.3 2006/07/30 00:51:01 jjanke Exp $
diff --git a/org.adempiere.base.process/src/org/compiere/process/IssueReport.java b/org.adempiere.base.process/src/org/compiere/process/IssueReport.java
index 299044b39e..b464166e07 100644
--- a/org.adempiere.base.process/src/org/compiere/process/IssueReport.java
+++ b/org.adempiere.base.process/src/org/compiere/process/IssueReport.java
@@ -23,11 +23,13 @@ import org.compiere.model.MSystem;
import org.compiere.util.AdempiereSystemError;
/**
- * Report System Issue
+ * Report System Issue.
*
* @author Jorg Janke
* @version $Id: IssueReport.java,v 1.2 2006/07/30 00:54:44 jjanke Exp $
+ * @deprecated not fully implemented
*/
+@Deprecated
@org.adempiere.base.annotation.Process
public class IssueReport extends SvrProcess
{
diff --git a/org.adempiere.base/src/com/akunagroup/uk/postcode/AddressInterface.java b/org.adempiere.base/src/com/akunagroup/uk/postcode/AddressInterface.java
index ac9cbd4305..6c594abef0 100644
--- a/org.adempiere.base/src/com/akunagroup/uk/postcode/AddressInterface.java
+++ b/org.adempiere.base/src/com/akunagroup/uk/postcode/AddressInterface.java
@@ -30,7 +30,9 @@ package com.akunagroup.uk.postcode;
* Interface for Address Lookup Web Service.
* https://sourceforge.net/p/adempiere/feature-requests/137/
* The Address Structure
+ * @deprecated
*/
+@Deprecated(forRemoval = true, since = "11")
public interface AddressInterface
{
public int size();
diff --git a/org.adempiere.base/src/com/akunagroup/uk/postcode/AddressLookup.java b/org.adempiere.base/src/com/akunagroup/uk/postcode/AddressLookup.java
index 7e1fd351fd..2dcfc607b9 100644
--- a/org.adempiere.base/src/com/akunagroup/uk/postcode/AddressLookup.java
+++ b/org.adempiere.base/src/com/akunagroup/uk/postcode/AddressLookup.java
@@ -51,7 +51,9 @@ import org.w3c.dom.NodeList;
*
* @author Michael Judd
* @version $Id$
+ * @deprecated
*/
+@Deprecated(forRemoval = true, since = "11")
public class AddressLookup implements AddressLookupInterface {
/** The logger. */
private static final CLogger log = CLogger.getCLogger(AddressLookup.class);
diff --git a/org.adempiere.base/src/com/akunagroup/uk/postcode/AddressLookupInterface.java b/org.adempiere.base/src/com/akunagroup/uk/postcode/AddressLookupInterface.java
index d366a53004..b7c25ebc85 100644
--- a/org.adempiere.base/src/com/akunagroup/uk/postcode/AddressLookupInterface.java
+++ b/org.adempiere.base/src/com/akunagroup/uk/postcode/AddressLookupInterface.java
@@ -32,7 +32,9 @@ import java.util.HashMap;
* Interface for Address Lookup Web Service.
* https://sourceforge.net/p/adempiere/feature-requests/137/
* The Address lookup class interface
+ * @deprecated
*/
+@Deprecated(forRemoval = true, since = "11")
public interface AddressLookupInterface {
/*
diff --git a/org.adempiere.base/src/com/akunagroup/uk/postcode/Postcode.java b/org.adempiere.base/src/com/akunagroup/uk/postcode/Postcode.java
index 4d85ecbb09..a95f504a0e 100644
--- a/org.adempiere.base/src/com/akunagroup/uk/postcode/Postcode.java
+++ b/org.adempiere.base/src/com/akunagroup/uk/postcode/Postcode.java
@@ -26,6 +26,7 @@
package com.akunagroup.uk.postcode;
+@Deprecated(forRemoval = true, since = "11")
public class Postcode implements AddressInterface
{
diff --git a/org.adempiere.base/src/org/adempiere/apps/graph/ChartBuilder.java b/org.adempiere.base/src/org/adempiere/apps/graph/ChartBuilder.java
index b7bbd9eac8..9299149dd8 100644
--- a/org.adempiere.base/src/org/adempiere/apps/graph/ChartBuilder.java
+++ b/org.adempiere.base/src/org/adempiere/apps/graph/ChartBuilder.java
@@ -58,6 +58,7 @@ import org.jfree.data.time.Year;
import org.jfree.data.xy.IntervalXYDataset;
/**
+ * Builder for JFree Chart
* @author Paul Bowden, Adaxa Pty Ltd
* @author hengsin
*
@@ -70,6 +71,9 @@ public class ChartBuilder {
private HashMap queries;
private Dataset dataset;
+ /**
+ * @param chart
+ */
public ChartBuilder(MChart chart) {
this.chartModel = chart;
}
@@ -145,6 +149,9 @@ public class ChartBuilder {
}
}
+ /**
+ * Load data from chart data source
+ */
public void loadData() {
queries = new HashMap();
for ( MChartDatasource ds : chartModel.getDatasources() )
@@ -153,6 +160,10 @@ public class ChartBuilder {
}
}
+ /**
+ * Load data from data source into {@link #dataset}
+ * @param ds
+ */
private void addData(MChartDatasource ds) {
String value = ds.getValueColumn();
@@ -335,8 +346,13 @@ public class ChartBuilder {
}
- private Date increment(Date lastDate, String timeUnit, int qty) {
-
+ /**
+ * @param lastDate input date
+ * @param timeUnit AD_Chart.TIMEUNIT_*
+ * @param qty qty to increment
+ * @return alter date
+ */
+ private Date increment(Date lastDate, String timeUnit, int qty) {
if ( lastDate == null )
return null;
@@ -357,35 +373,56 @@ public class ChartBuilder {
return cal.getTime();
}
+ /**
+ * Create and load data set from data source
+ * @return CategoryDataset
+ */
public CategoryDataset getCategoryDataset() {
dataset = new DefaultCategoryDataset();
loadData();
return (CategoryDataset) dataset;
}
+ /**
+ * Create and load data set from data source
+ * @return IntervalXYDataset
+ */
public IntervalXYDataset getXYDataset() {
dataset = new TimeSeriesCollection();
loadData();
return (IntervalXYDataset) dataset;
}
+ /**
+ * Create and load data set from data source
+ * @return PieDataset
+ */
public PieDataset getPieDataset() {
dataset = new DefaultPieDataset();
loadData();
return (PieDataset) dataset;
}
+ /**
+ * Get current data set
+ * @return dataset
+ */
public Dataset getDataset() {
return dataset;
}
+ /**
+ * @return named query
+ */
public HashMap getQueries() {
return queries;
}
- public MQuery getQuery(String key) {
-
-
+ /**
+ * @param key
+ * @return MQuery
+ */
+ public MQuery getQuery(String key) {
if ( queries.containsKey(key) )
{
return queries.get(key);
@@ -394,6 +431,9 @@ public class ChartBuilder {
return null;
}
+ /**
+ * @return JFreeChart
+ */
private JFreeChart createXYBarChart() {
JFreeChart chart = ChartFactory.createXYBarChart(
chartModel.get_Translation(MChart.COLUMNNAME_Name), // chart title
@@ -412,6 +452,9 @@ public class ChartBuilder {
return chart;
}
+ /**
+ * @return JFreeChart
+ */
private JFreeChart createTimeSeriesChart() {
JFreeChart chart = ChartFactory.createTimeSeriesChart(
chartModel.get_Translation(MChart.COLUMNNAME_Name), // chart title
@@ -427,6 +470,9 @@ public class ChartBuilder {
return chart;
}
+ /**
+ * @return JFreeChart
+ */
private JFreeChart createWaterfallChart() {
JFreeChart chart = ChartFactory.createWaterfallChart(
chartModel.get_Translation(MChart.COLUMNNAME_Name), // chart title
@@ -444,6 +490,9 @@ public class ChartBuilder {
return chart;
}
+ /**
+ * @return JFreeChart
+ */
private JFreeChart createRingChart() {
final JFreeChart chart = ChartFactory.createRingChart(chartModel.get_Translation(MChart.COLUMNNAME_Name),
getPieDataset(), chartModel.isDisplayLegend(), true, true);
@@ -451,6 +500,9 @@ public class ChartBuilder {
return chart;
}
+ /**
+ * @return JFreeChart
+ */
private JFreeChart createPieChart() {
final JFreeChart chart = ChartFactory.createPieChart(chartModel.get_Translation(MChart.COLUMNNAME_Name),
getPieDataset(), false, true, true);
@@ -458,6 +510,9 @@ public class ChartBuilder {
return chart;
}
+ /**
+ * @return JFreeChart
+ */
private JFreeChart create3DPieChart() {
final JFreeChart chart = ChartFactory.createPieChart(chartModel.get_Translation(MChart.COLUMNNAME_Name),
getPieDataset(), false, true, true);
@@ -465,6 +520,9 @@ public class ChartBuilder {
return chart;
}
+ /**
+ * @return JFreeChart
+ */
private JFreeChart createBarChart() {
JFreeChart chart = ChartFactory.createBarChart(
chartModel.get_Translation(MChart.COLUMNNAME_Name), // chart title
@@ -488,6 +546,9 @@ public class ChartBuilder {
return chart;
}
+ /**
+ * @return JFreeChart
+ */
private JFreeChart create3DBarChart() {
JFreeChart chart = ChartFactory.createBarChart(
chartModel.get_Translation(MChart.COLUMNNAME_Name), // chart title
@@ -505,6 +566,9 @@ public class ChartBuilder {
return chart;
}
+ /**
+ * @return JFreeChart
+ */
private JFreeChart createStackedBarChart() {
JFreeChart chart = ChartFactory.createStackedBarChart(
chartModel.get_Translation(MChart.COLUMNNAME_Name), // chart title
@@ -529,6 +593,9 @@ public class ChartBuilder {
return chart;
}
+ /**
+ * @return JFreeChart
+ */
private JFreeChart create3DStackedBarChart() {
JFreeChart chart = ChartFactory.createStackedBarChart(
chartModel.get_Translation(MChart.COLUMNNAME_Name), // chart title
@@ -546,6 +613,9 @@ public class ChartBuilder {
return chart;
}
+ /**
+ * @return JFreeChart
+ */
private JFreeChart createAreaChart() {
// create the chart...
JFreeChart chart = ChartFactory.createAreaChart(
@@ -564,6 +634,9 @@ public class ChartBuilder {
return chart;
}
+ /**
+ * @return JFreeChart
+ */
private JFreeChart createStackedAreaChart() {
// create the chart...
JFreeChart chart = ChartFactory.createStackedAreaChart(
@@ -582,6 +655,9 @@ public class ChartBuilder {
return chart;
}
+ /**
+ * @return JFreeChart
+ */
private JFreeChart createLineChart() {
// create the chart...
JFreeChart chart = ChartFactory.createLineChart(
@@ -601,6 +677,9 @@ public class ChartBuilder {
return chart;
}
+ /**
+ * @return JFreeChart
+ */
private JFreeChart create3DLineChart() {
// create the chart...
JFreeChart chart = ChartFactory.createLineChart(
@@ -620,6 +699,9 @@ public class ChartBuilder {
return chart;
}
+ /**
+ * @param chart
+ */
private void setupCategoryChart(JFreeChart chart) {
CategoryPlot plot = chart.getCategoryPlot();
CategoryAxis xAxis = (CategoryAxis)plot.getDomainAxis();
diff --git a/org.adempiere.base/src/org/adempiere/apps/graph/GraphBuilder.java b/org.adempiere.base/src/org/adempiere/apps/graph/GraphBuilder.java
index 2f8263974b..b04ed41b08 100644
--- a/org.adempiere.base/src/org/adempiere/apps/graph/GraphBuilder.java
+++ b/org.adempiere.base/src/org/adempiere/apps/graph/GraphBuilder.java
@@ -33,8 +33,9 @@ import org.jfree.data.general.DefaultPieDataset;
/**
*
* @author hengsin
- *
+ * @deprecated
*/
+@Deprecated
public class GraphBuilder {
/** The Goal */
diff --git a/org.adempiere.base/src/org/adempiere/apps/graph/GraphColumn.java b/org.adempiere.base/src/org/adempiere/apps/graph/GraphColumn.java
index 138f8fe1e3..2b2d694fb3 100644
--- a/org.adempiere.base/src/org/adempiere/apps/graph/GraphColumn.java
+++ b/org.adempiere.base/src/org/adempiere/apps/graph/GraphColumn.java
@@ -29,13 +29,11 @@ import org.compiere.util.CLogger;
import org.compiere.util.DisplayType;
/**
- *
+ * Value object of chart column
* @author hengsin
- *
*/
public class GraphColumn
{
-
/**
* Base Constructor
* @param label label
@@ -81,6 +79,8 @@ public class GraphColumn
/**
* Request Type Constructor
* @param rt Request Type
+ * @param data
+ * @param id
*/
public GraphColumn (MRequestType rt, BigDecimal data, int id)
{
@@ -92,6 +92,8 @@ public class GraphColumn
/**
* Project Type Constructor
* @param pt Project Type
+ * @param data
+ * @param id
*/
public GraphColumn (MProjectType pt, BigDecimal data, int id)
{
@@ -163,33 +165,48 @@ public class GraphColumn
return m_mc;
} // getMeasureCalc
+ /**
+ * @return MRequestType
+ */
public MRequestType getRequestType()
{
return m_rt;
}
+ /**
+ * @return MProjectType
+ */
public MProjectType getProjectType()
{
return m_pt;
}
+ /**
+ * @return measure display type (MGoal.MEASUREDISPLAY_*)
+ */
public String getMeasureDisplay()
{
return m_measureDisplay;
} // getMeasureDisplay
+ /**
+ * @return date
+ */
public Timestamp getDate()
{
return m_date;
} // getDate
+ /**
+ * @return record id
+ */
public int getID()
{
return m_id;
}
/**
- * @return Returns the label.
+ * @return column label.
*/
public String getLabel ()
{
@@ -210,7 +227,7 @@ public class GraphColumn
/**
* @param date for label.
- * @param MeasureDisplay measure display
+ * @param MeasureDisplay measure display type (MGoal.MEASUREDISPLAY_*)
*/
public void setLabel (Timestamp date, String MeasureDisplay)
{
@@ -243,7 +260,7 @@ public class GraphColumn
} // setLabel
/**
- * @return Returns the targetValue.
+ * @return targetValue.
*/
public double getTargetValue ()
{
@@ -259,7 +276,7 @@ public class GraphColumn
} // setTargetValue
/**
- * @return Returns the data value.
+ * @return data value
*/
public double getValue ()
{
@@ -279,7 +296,7 @@ public class GraphColumn
} // setValue
/**
- * @return Returns the column width in pixels.
+ * @return column width in pixels.
*/
public double getColWidth ()
{
@@ -295,7 +312,7 @@ public class GraphColumn
} // getColWidth
/**
- * @return Returns the height in pixels.
+ * @return height in pixels.
*/
public double getColHeight()
{
@@ -310,6 +327,11 @@ public class GraphColumn
m_height = height;
} // setHeight
+ /**
+ * Get query for goal
+ * @param mGoal
+ * @return query
+ */
public MQuery getMQuery(MGoal mGoal)
{
MQuery query = null;
diff --git a/org.adempiere.base/src/org/adempiere/base/AbstractModelFactory.java b/org.adempiere.base/src/org/adempiere/base/AbstractModelFactory.java
index d9e496669a..5f40629057 100644
--- a/org.adempiere.base/src/org/adempiere/base/AbstractModelFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/AbstractModelFactory.java
@@ -45,6 +45,13 @@ public abstract class AbstractModelFactory implements IModelFactory {
return getPO(getClass(tableName), tableName, Record_ID, trxName);
}
+ /**
+ * @param clazz
+ * @param tableName
+ * @param Record_ID
+ * @param trxName
+ * @return new PO instance
+ */
public static PO getPO(Class> clazz, String tableName, int Record_ID, String trxName) {
if (clazz == null)
{
@@ -130,6 +137,13 @@ public abstract class AbstractModelFactory implements IModelFactory {
return getPO(getClass(tableName), tableName, Record_UU, trxName);
}
+ /**
+ * @param clazz
+ * @param tableName
+ * @param Record_UU
+ * @param trxName
+ * @return new PO instance
+ */
public static PO getPO(Class> clazz, String tableName, String Record_UU, String trxName) {
if (clazz == null)
{
@@ -208,6 +222,13 @@ public abstract class AbstractModelFactory implements IModelFactory {
return getPO(getClass(tableName), tableName, rs, trxName);
}
+ /**
+ * @param clazz
+ * @param tableName
+ * @param rs
+ * @param trxName
+ * @return new PO instance
+ */
public static PO getPO(Class> clazz, String tableName, ResultSet rs, String trxName) {
if (clazz == null)
{
diff --git a/org.adempiere.base/src/org/adempiere/base/AnnotationBasedColumnCalloutFactory.java b/org.adempiere.base/src/org/adempiere/base/AnnotationBasedColumnCalloutFactory.java
index 98fcbe021e..a608d59159 100644
--- a/org.adempiere.base/src/org/adempiere/base/AnnotationBasedColumnCalloutFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/AnnotationBasedColumnCalloutFactory.java
@@ -98,6 +98,12 @@ public abstract class AnnotationBasedColumnCalloutFactory extends AnnotationBase
return callouts.toArray(new IColumnCallout[0]);
}
+ /**
+ * Create new callout instance using reflection and add it to the callouts list
+ * @param callouts
+ * @param classLoader
+ * @param calloutClassNames
+ */
private void newCalloutInstance(List callouts, ClassLoader classLoader,
List calloutClassNames) {
for(String calloutClass : calloutClassNames) {
@@ -136,6 +142,11 @@ public abstract class AnnotationBasedColumnCalloutFactory extends AnnotationBase
*/
protected abstract String[] getPackages();
+ /**
+ * Perform annotation scanning upon activation of component
+ * @param context
+ * @throws ClassNotFoundException
+ */
@Activate
public void activate(ComponentContext context) throws ClassNotFoundException {
long start = System.currentTimeMillis();
@@ -179,6 +190,11 @@ public abstract class AnnotationBasedColumnCalloutFactory extends AnnotationBase
graph.scanAsync(getExecutorService(), getMaxThreads(), scanResultProcessor, getScanFailureHandler());
}
+ /**
+ * Process class annotation and register column callout.
+ * @param className
+ * @param annotationInfo
+ */
private void processAnnotation(String className, AnnotationInfo annotationInfo) {
//not sure why but sometime ClassGraph return Object[] instead of the expected String[]
Object[] tableNames = (Object[]) annotationInfo.getParameterValues().getValue("tableName");
@@ -232,6 +248,12 @@ public abstract class AnnotationBasedColumnCalloutFactory extends AnnotationBase
}
}
+ /**
+ * add callout for column names
+ * @param className
+ * @param columnNames
+ * @param columnNameMap
+ */
private void addCallout(String className, Object[] columnNames, Map> columnNameMap) {
for (Object columnName : columnNames) {
List callouts = columnNameMap.get(columnName);
@@ -243,6 +265,11 @@ public abstract class AnnotationBasedColumnCalloutFactory extends AnnotationBase
}
}
+ /**
+ * add global callout (for all columns)
+ * @param className
+ * @param columnNameMap
+ */
private void addCallout(String className, Map> columnNameMap) {
List callouts = columnNameMap.get("*");
if (callouts == null ) {
diff --git a/org.adempiere.base/src/org/adempiere/base/AnnotationBasedEventManager.java b/org.adempiere.base/src/org/adempiere/base/AnnotationBasedEventManager.java
index 67c9be31d2..0d29ab1ab1 100644
--- a/org.adempiere.base/src/org/adempiere/base/AnnotationBasedEventManager.java
+++ b/org.adempiere.base/src/org/adempiere/base/AnnotationBasedEventManager.java
@@ -215,6 +215,12 @@ public abstract class AnnotationBasedEventManager extends AnnotationBasedFactory
scan(bundleContext, true, getPackages());
}
+ /**
+ * @param classLoader
+ * @param className
+ * @param filter
+ * @return new SimpleEventHandler instance
+ */
private EventHandler simpleEventDelegate(ClassLoader classLoader, String className, String filter) {
try {
@SuppressWarnings("unchecked")
@@ -233,6 +239,13 @@ public abstract class AnnotationBasedEventManager extends AnnotationBasedFactory
}
}
+ /**
+ * @param classLoader
+ * @param className
+ * @param annotationInfo
+ * @param filter
+ * @return new ProcessEventHandler instance
+ */
private EventHandler processEventDelegate(ClassLoader classLoader, String className, AnnotationInfo annotationInfo, String filter) {
try {
String processUUID = (String) annotationInfo.getParameterValues().getValue("processUUID");
@@ -252,6 +265,13 @@ public abstract class AnnotationBasedEventManager extends AnnotationBasedFactory
}
}
+ /**
+ * @param classLoader
+ * @param className
+ * @param annotationInfo
+ * @param filter
+ * @return new ImportEventHandler instance
+ */
private EventHandler importEventDelegate(ClassLoader classLoader, String className, AnnotationInfo annotationInfo, String filter) {
try {
String importTableName = (String) annotationInfo.getParameterValues().getValue("importTableName");
@@ -271,6 +291,13 @@ public abstract class AnnotationBasedEventManager extends AnnotationBasedFactory
}
}
+ /**
+ * @param classLoader
+ * @param className
+ * @param annotationInfo
+ * @param filter
+ * @return new ModelEventHandler instance
+ */
private EventHandler modelEventDelegate(ClassLoader classLoader, String className, AnnotationInfo annotationInfo, String filter) {
try {
AnnotationClassRef classRef = (AnnotationClassRef) annotationInfo.getParameterValues().getValue("modelClass");
diff --git a/org.adempiere.base/src/org/adempiere/base/AnnotationBasedFactory.java b/org.adempiere.base/src/org/adempiere/base/AnnotationBasedFactory.java
index 9083b0d445..970dbb2a4a 100644
--- a/org.adempiere.base/src/org/adempiere/base/AnnotationBasedFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/AnnotationBasedFactory.java
@@ -21,6 +21,7 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.logging.Level;
import org.compiere.Adempiere;
import org.compiere.util.CLogger;
@@ -66,14 +67,18 @@ public abstract class AnnotationBasedFactory {
} catch (Exception e) { }
}
+ /**
+ * Wait for completion of annotation scanning
+ */
protected void blockWhileScanning() {
String className = this.getClass().getSimpleName();
if(!scanCompleted.get())
try {
Instant start = Instant.now();
threadBlockerFuture.get();
- s_log.fine(() -> String.format("%s waited %d(ms) for class scanning to end"
- , className, Duration.between(start, Instant.now()).toMillis()));
+ if (s_log.isLoggable(Level.FINE))
+ s_log.fine(() -> String.format("%s waited %d(ms) for class scanning to end"
+ , className, Duration.between(start, Instant.now()).toMillis()));
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
diff --git a/org.adempiere.base/src/org/adempiere/base/AnnotationBasedModelFactory.java b/org.adempiere.base/src/org/adempiere/base/AnnotationBasedModelFactory.java
index 498614c35f..4ed50f8ab8 100644
--- a/org.adempiere.base/src/org/adempiere/base/AnnotationBasedModelFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/AnnotationBasedModelFactory.java
@@ -32,7 +32,7 @@ import io.github.classgraph.ScanResult;
/**
* Translates table names into model classes having the {@link Model} annotation. Relies on
- * {@link DefaultModelFactory} for everything else.
+ * {@link DefaultModelFactory} for everything else.
* This factory is designed to have a service rank higher than {@link DefaultModelFactory}, as class
* discovery using SPI is preferred over reflection-based methods.
* @author Saulo Gil
@@ -77,6 +77,11 @@ public class AnnotationBasedModelFactory extends AnnotationBasedFactory implemen
return patterns;
}
+ /**
+ * Scan annotation upon activation of component
+ * @param context
+ * @throws ClassNotFoundException
+ */
@Activate
public void activate(ComponentContext context) throws ClassNotFoundException {
long start = System.currentTimeMillis();
@@ -125,6 +130,11 @@ public class AnnotationBasedModelFactory extends AnnotationBasedFactory implemen
graph.scanAsync(getExecutorService(), getMaxThreads(), scanResultProcessor, getScanFailureHandler());
}
+ /**
+ * Process annotation scan result
+ * @param classLoader
+ * @param scanResult
+ */
private void processResults(ClassLoader classLoader, ScanResult scanResult ) {
BiConsumer exceptionHandler = (className, exception) ->
s_log.severe(String.format("exception while loading class %s - %s", className, exception.getMessage()));
diff --git a/org.adempiere.base/src/org/adempiere/base/AnnotationBasedProcessFactory.java b/org.adempiere.base/src/org/adempiere/base/AnnotationBasedProcessFactory.java
index fa18817f56..adf693ae82 100644
--- a/org.adempiere.base/src/org/adempiere/base/AnnotationBasedProcessFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/AnnotationBasedProcessFactory.java
@@ -44,7 +44,7 @@ import io.github.classgraph.ClassGraph.ScanResultProcessor;
import io.github.classgraph.ClassInfo;
/**
- * Scan, discover and register process classes.
+ * Scan, discover and register process classes.
* Process class will be registered using class name. You can use the optional
* {@link Process} annotation to register a process class with an additional name (for e.g
* to replace a core process class).
@@ -72,6 +72,11 @@ public abstract class AnnotationBasedProcessFactory extends AnnotationBasedFacto
*/
protected abstract String[] getPackages();
+ /**
+ * Scan annotation upon activation of component
+ * @param context
+ * @throws ClassNotFoundException
+ */
@Activate
public void activate(ComponentContext context) throws ClassNotFoundException {
long start = System.currentTimeMillis();
@@ -103,8 +108,9 @@ public abstract class AnnotationBasedProcessFactory extends AnnotationBasedFacto
classCache.put(alternateName, className);
}
long end = System.currentTimeMillis();
- s_log.info(() -> this.getClass().getSimpleName() + " loaded " + classCache.size() + " classes in "
- + ((end-start)/1000f) + "s");
+ if (s_log.isLoggable(Level.INFO))
+ s_log.info(() -> this.getClass().getSimpleName() + " loaded " + classCache.size() + " classes in "
+ + ((end-start)/1000f) + "s");
signalScanCompletion(true);
};
diff --git a/org.adempiere.base/src/org/adempiere/base/ColumnCalloutManager.java b/org.adempiere.base/src/org/adempiere/base/ColumnCalloutManager.java
index 854074710e..5965e577b8 100644
--- a/org.adempiere.base/src/org/adempiere/base/ColumnCalloutManager.java
+++ b/org.adempiere.base/src/org/adempiere/base/ColumnCalloutManager.java
@@ -59,7 +59,6 @@ public final class ColumnCalloutManager {
}
/**
- *
* @param tableName
* @param columnName
* @return list of {@link IColumnCallout} register for tableName.columnName
@@ -137,7 +136,6 @@ public final class ColumnCalloutManager {
// IDEMPIERE-2732
/**
- *
* @param className
* @param methodName
* @return {@link Callout} for className and methodName
@@ -172,8 +170,7 @@ public final class ColumnCalloutManager {
}
/**
- *
- * @return {@link IMappedColumnCalloutFactory}
+ * @return {@link IMappedColumnCalloutFactory} instance
*/
public synchronized static IMappedColumnCalloutFactory getMappedColumnCalloutFactory() {
IMappedColumnCalloutFactory factoryService = null;
diff --git a/org.adempiere.base/src/org/adempiere/base/ComponentBlackListService.java b/org.adempiere.base/src/org/adempiere/base/ComponentBlackListService.java
index f6f565c45f..9f627e647a 100644
--- a/org.adempiere.base/src/org/adempiere/base/ComponentBlackListService.java
+++ b/org.adempiere.base/src/org/adempiere/base/ComponentBlackListService.java
@@ -33,6 +33,8 @@ import org.osgi.service.component.runtime.ServiceComponentRuntime;
import org.osgi.service.component.runtime.dto.ComponentDescriptionDTO;
/**
+ * Service listener to block the loading of OSGi component.
+ * To block the loading of an OSGi component, append the OSGi component's component name to {IDEMPIERE_HOME}/components.blacklist file.
* @author hengsin
*
*/
diff --git a/org.adempiere.base/src/org/adempiere/base/DefaultAddressValidationFactory.java b/org.adempiere.base/src/org/adempiere/base/DefaultAddressValidationFactory.java
index 5555259e39..547f590704 100644
--- a/org.adempiere.base/src/org/adempiere/base/DefaultAddressValidationFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/DefaultAddressValidationFactory.java
@@ -20,7 +20,8 @@ import org.adempiere.model.IAddressValidation;
import org.compiere.util.CLogger;
/**
- * Default address validation factory
+ * Default {@link IAddressValidationFactory} implementation for core.
+ * Load {@link IAddressValidation} instance from plugin.xml (org.adempiere.model.IAddressValidation extension point) or class path.
* @author Elaine
*
*/
diff --git a/org.adempiere.base/src/org/adempiere/base/DefaultCalloutFactory.java b/org.adempiere.base/src/org/adempiere/base/DefaultCalloutFactory.java
index e0853b04c0..a2be08a332 100644
--- a/org.adempiere.base/src/org/adempiere/base/DefaultCalloutFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/DefaultCalloutFactory.java
@@ -21,10 +21,9 @@ import org.compiere.model.Callout;
import org.compiere.util.CLogger;
/**
+ * Default {@link ICalloutFactory} implementation for core.
+ * Load {@link Callout} instance from plugin.xml (org.compiere.model.Callout extension point) or class path.
* @author a42niem
- *
- * This is just a blueprint for creation of a CalloutFactory
- *
*/
public class DefaultCalloutFactory implements ICalloutFactory {
@@ -96,7 +95,8 @@ public class DefaultCalloutFactory implements ICalloutFactory {
}
}
}
- log.log(Level.FINE, "Required method " + methodName + " not found in class " + className);
+ if (log.isLoggable(Level.FINE))
+ log.log(Level.FINE, "Required method " + methodName + " not found in class " + className);
return null;
}
diff --git a/org.adempiere.base/src/org/adempiere/base/DefaultColumnCalloutFactory.java b/org.adempiere.base/src/org/adempiere/base/DefaultColumnCalloutFactory.java
index 6bc7fe1969..b7f1858014 100644
--- a/org.adempiere.base/src/org/adempiere/base/DefaultColumnCalloutFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/DefaultColumnCalloutFactory.java
@@ -18,8 +18,9 @@ import java.util.List;
import org.adempiere.base.equinox.EquinoxExtensionLocator;
/**
+ * Default {@link IColumnCalloutFactory} implementation for core.
+ * Load {@link IColumnCallout} instance from plugin.xml (org.adempiere.base.IColumnCallout extension point)
* @author hengsin
- *
*/
public class DefaultColumnCalloutFactory implements IColumnCalloutFactory {
diff --git a/org.adempiere.base/src/org/adempiere/base/DefaultDocumentFactory.java b/org.adempiere.base/src/org/adempiere/base/DefaultDocumentFactory.java
index 37e1e83ec1..bee2e8dcc9 100644
--- a/org.adempiere.base/src/org/adempiere/base/DefaultDocumentFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/DefaultDocumentFactory.java
@@ -25,7 +25,8 @@ import org.compiere.util.CLogger;
import org.compiere.util.Env;
/**
- *
+ * Default {@link IDocFactory} implementation from core.
+ * Load {@link Doc} instance from class path.
* @author hengsin
*
*/
diff --git a/org.adempiere.base/src/org/adempiere/base/DefaultLookupFactory.java b/org.adempiere.base/src/org/adempiere/base/DefaultLookupFactory.java
index 31dd5ffce8..68537240a7 100644
--- a/org.adempiere.base/src/org/adempiere/base/DefaultLookupFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/DefaultLookupFactory.java
@@ -26,9 +26,10 @@ import org.compiere.util.DisplayType;
import static org.compiere.util.DisplayType.*;
/**
+ * Default {@link ILookupFactory} implementation for core.
+ * Create new {@link Lookup} instance by predefined display type.
* @author Jan Thielemann - jan.thielemann@evenos.de
* @author hengsin
- *
*/
public class DefaultLookupFactory implements ILookupFactory{
diff --git a/org.adempiere.base/src/org/adempiere/base/DefaultModelValidatorFactory.java b/org.adempiere.base/src/org/adempiere/base/DefaultModelValidatorFactory.java
index fe7ecec0aa..784a5c9a34 100644
--- a/org.adempiere.base/src/org/adempiere/base/DefaultModelValidatorFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/DefaultModelValidatorFactory.java
@@ -17,8 +17,9 @@ import org.adempiere.base.equinox.EquinoxExtensionLocator;
import org.compiere.model.ModelValidator;
/**
+ * Default {@link IModelValidatorFactory} implementation for core.
+ * Load {@link ModelValidator} instance from plugin.xml (org.adempiere.base.ModelValidator extension point) or class path.
* @author hengsin
- *
*/
public class DefaultModelValidatorFactory implements IModelValidatorFactory {
diff --git a/org.adempiere.base/src/org/adempiere/base/DefaultPaymentExporterFactory.java b/org.adempiere.base/src/org/adempiere/base/DefaultPaymentExporterFactory.java
index bdfc978423..2ab829b795 100644
--- a/org.adempiere.base/src/org/adempiere/base/DefaultPaymentExporterFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/DefaultPaymentExporterFactory.java
@@ -20,8 +20,9 @@ import org.compiere.util.CLogger;
import org.compiere.util.PaymentExport;
/**
+ * Default {@link IPaymentExporterFactory} implementation for core.
+ * Load {@link PaymentExport} instance from plugin.xml (org.compiere.util.PaymentExport extension point) or class path.
* @author mbozem
- *
*/
public class DefaultPaymentExporterFactory implements IPaymentExporterFactory {
diff --git a/org.adempiere.base/src/org/adempiere/base/DefaultPaymentProcessorFactory.java b/org.adempiere.base/src/org/adempiere/base/DefaultPaymentProcessorFactory.java
index c948cbfd44..b79627757c 100644
--- a/org.adempiere.base/src/org/adempiere/base/DefaultPaymentProcessorFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/DefaultPaymentProcessorFactory.java
@@ -20,8 +20,9 @@ import org.compiere.model.PaymentProcessor;
import org.compiere.util.CLogger;
/**
+ * Default {@link IPaymentProcessorFactory} implementation for core.
+ * Load {@link PaymentProcessor} instance from plugin.xml (org.compiere.model.PaymentProcessor extension point) or class path.
* @author hengsin
- *
*/
public class DefaultPaymentProcessorFactory implements IPaymentProcessorFactory {
diff --git a/org.adempiere.base/src/org/adempiere/base/DefaultProcessFactory.java b/org.adempiere.base/src/org/adempiere/base/DefaultProcessFactory.java
index 7d1f7b13a3..a1aa9396fe 100644
--- a/org.adempiere.base/src/org/adempiere/base/DefaultProcessFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/DefaultProcessFactory.java
@@ -20,8 +20,9 @@ import org.compiere.process.ProcessCall;
import org.compiere.util.CLogger;
/**
+ * Default {@link IProcessFactory} implementation for core.
+ * Load {@link ProcessCall} instance from plugin.xml (org.adempiere.base.Process extension point) or class path.
* @author hengsin
- *
*/
public class DefaultProcessFactory implements IProcessFactory {
diff --git a/org.adempiere.base/src/org/adempiere/base/DefaultProductPricingFactory.java b/org.adempiere.base/src/org/adempiere/base/DefaultProductPricingFactory.java
index e8f87f618d..764a548ae1 100644
--- a/org.adempiere.base/src/org/adempiere/base/DefaultProductPricingFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/DefaultProductPricingFactory.java
@@ -1,7 +1,35 @@
+/***********************************************************************
+ * This file is part of iDempiere ERP Open Source *
+ * http://www.idempiere.org *
+ * *
+ * Copyright (C) Contributors *
+ * *
+ * This program is free software; you can redistribute it and/or *
+ * modify it under the terms of the GNU General Public License *
+ * as published by the Free Software Foundation; either version 2 *
+ * of the License, or (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
+ * MA 02110-1301, USA. *
+ * *
+ * Contributors: *
+ * - Diego Ruiz *
+ **********************************************************************/
package org.adempiere.base;
import org.compiere.model.MProductPricing;
+/**
+ * Default {@link IProductPricingFactory} implementation for core.
+ * Always return new {@link MProductPricing} instance.
+ */
public class DefaultProductPricingFactory implements IProductPricingFactory {
/**
diff --git a/org.adempiere.base/src/org/adempiere/base/DefaultShipmentProcessorFactory.java b/org.adempiere.base/src/org/adempiere/base/DefaultShipmentProcessorFactory.java
index 77667ed00b..4d10b9e7a5 100644
--- a/org.adempiere.base/src/org/adempiere/base/DefaultShipmentProcessorFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/DefaultShipmentProcessorFactory.java
@@ -20,8 +20,9 @@ import org.adempiere.model.IShipmentProcessor;
import org.compiere.util.CLogger;
/**
+ * Default {@link IShipmentProcessorFactory} implementation for core.
+ * Load {@link IShipmentProcessor} instance from plugin.xml (org.adempiere.model.IShipmentProcessor extension point) or class path.
* @author hengsin
- *
*/
public class DefaultShipmentProcessorFactory implements IShipmentProcessorFactory {
diff --git a/org.adempiere.base/src/org/adempiere/base/DefaultTaxLookup.java b/org.adempiere.base/src/org/adempiere/base/DefaultTaxLookup.java
index 3f3c376244..997083ae95 100644
--- a/org.adempiere.base/src/org/adempiere/base/DefaultTaxLookup.java
+++ b/org.adempiere.base/src/org/adempiere/base/DefaultTaxLookup.java
@@ -31,8 +31,9 @@ import org.compiere.model.Tax;
import org.osgi.service.component.annotations.Component;
/**
+ * Default {@link ITaxLookup} implementation for core.
+ * Delegate to the static get methods in {@link Tax}.
* @author hengsin
- *
*/
@Component(immediate = true, service = {ITaxLookup.class})
public class DefaultTaxLookup implements ITaxLookup {
diff --git a/org.adempiere.base/src/org/adempiere/base/DefaultTaxProviderFactory.java b/org.adempiere.base/src/org/adempiere/base/DefaultTaxProviderFactory.java
index 3b5a1d14bf..bfb9b35621 100644
--- a/org.adempiere.base/src/org/adempiere/base/DefaultTaxProviderFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/DefaultTaxProviderFactory.java
@@ -20,9 +20,9 @@ import org.adempiere.model.ITaxProvider;
import org.compiere.util.CLogger;
/**
- * Default tax provider factory
+ * Default {@link ITaxProviderFactory} implementation for core.
+ * Load {@link ITaxProvider} instance from plugin.xml (org.adempiere.model.ITaxProvider extension point) or class path.
* @author Elaine
- *
*/
public class DefaultTaxProviderFactory implements ITaxProviderFactory {
diff --git a/org.adempiere.base/src/org/adempiere/base/IBankStatementLoaderFactory.java b/org.adempiere.base/src/org/adempiere/base/IBankStatementLoaderFactory.java
index 6b5839824b..64b38339c5 100644
--- a/org.adempiere.base/src/org/adempiere/base/IBankStatementLoaderFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/IBankStatementLoaderFactory.java
@@ -34,7 +34,7 @@ public interface IBankStatementLoaderFactory {
* want to use.
*
* @param className
- * @return BankStatementLoader instance
+ * @return BankStatementLoaderInterface instance
*/
public BankStatementLoaderInterface newBankStatementLoaderInstance(String className);
}
diff --git a/org.adempiere.base/src/org/adempiere/base/IBankStatementMatcherFactory.java b/org.adempiere.base/src/org/adempiere/base/IBankStatementMatcherFactory.java
index 0f1f10c374..d20d3bf411 100644
--- a/org.adempiere.base/src/org/adempiere/base/IBankStatementMatcherFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/IBankStatementMatcherFactory.java
@@ -28,7 +28,7 @@ public interface IBankStatementMatcherFactory {
* the fully qualified classname of the Loader class you want to use.
*
* @param className
- * @return BankStatementMatcher instance
+ * @return BankStatementMatcherInterface instance
*/
public BankStatementMatcherInterface newBankStatementMatcherInstance(String className);
}
diff --git a/org.adempiere.base/src/org/adempiere/base/ICalloutFactory.java b/org.adempiere.base/src/org/adempiere/base/ICalloutFactory.java
index 701f6c3dd0..1b487ac9be 100644
--- a/org.adempiere.base/src/org/adempiere/base/ICalloutFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/ICalloutFactory.java
@@ -16,17 +16,17 @@ package org.adempiere.base;
import org.compiere.model.Callout;
/**
- *
+ * Factory interface for {@link Callout}.
+ * For plugin that implement this as OSGi component, use property = {"service.ranking:Integer=1"} to set up a calling order
+ * that prioritizes your component over core component.
* @author a42niem
- *
*/
public interface ICalloutFactory {
/**
- *
* @param className
* @param methodName
- * @return matching Callout
+ * @return matching Callout instance
*/
public Callout getCallout(String className, String methodName);
diff --git a/org.adempiere.base/src/org/adempiere/base/IColumnCallout.java b/org.adempiere.base/src/org/adempiere/base/IColumnCallout.java
index 49e3c00e80..0b091595c4 100755
--- a/org.adempiere.base/src/org/adempiere/base/IColumnCallout.java
+++ b/org.adempiere.base/src/org/adempiere/base/IColumnCallout.java
@@ -29,15 +29,15 @@ public interface IColumnCallout
/**
* Start Callout.
*
- * Callout's are used for cross field validation and setting values in other fields
- * when returning a non empty (error message) string, an exception is raised
+ * Callout's are used for cross field validation and setting values in other fields.
+ * When returning a non empty (error message) string, an exception is raised.
*
* When invoked, the Tab model has the new value!
*
* @param ctx Context
* @param WindowNo current Window No
- * @param mTab Model Tab
- * @param mField Model Field
+ * @param mTab Tab model
+ * @param mField Field model
* @param value The new value
* @param oldValue The old value
* @return Error message or ""
diff --git a/org.adempiere.base/src/org/adempiere/base/IColumnCalloutFactory.java b/org.adempiere.base/src/org/adempiere/base/IColumnCalloutFactory.java
index b8f63459d6..8cb561d6d5 100644
--- a/org.adempiere.base/src/org/adempiere/base/IColumnCalloutFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/IColumnCalloutFactory.java
@@ -14,14 +14,14 @@
package org.adempiere.base;
/**
- *
+ * Factory interface for {@link IColumnCallout}.
+ * For plugin that implement this as OSGi component, use property = {"service.ranking:Integer=1"} to set up a calling order
+ * that prioritizes your component over core component.
* @author hengsin
- *
*/
public interface IColumnCalloutFactory {
/**
- *
* @param tableName
* @param columnName
* @return array of matching callouts
diff --git a/org.adempiere.base/src/org/adempiere/base/IDictionaryService.java b/org.adempiere.base/src/org/adempiere/base/IDictionaryService.java
index dded3eac76..40ba165697 100644
--- a/org.adempiere.base/src/org/adempiere/base/IDictionaryService.java
+++ b/org.adempiere.base/src/org/adempiere/base/IDictionaryService.java
@@ -21,15 +21,22 @@ import org.compiere.model.X_AD_Package_Imp_Proc;
import org.osgi.framework.BundleContext;
/**
- * A dictionary service provides for easy handling of dynamic Adempiere
- * dictionary.
+ * Interface for import of Application Dictionary data.
*
* @author Joerg Viola
- *
*/
public interface IDictionaryService {
+ /**
+ * Import application dictionary package
+ * @param context
+ * @param packageFile Application Dictionary package
+ * @throws Exception
+ */
void merge(BundleContext context, File packageFile) throws Exception;
+ /**
+ * @return X_AD_Package_Imp_Proc
+ */
default public X_AD_Package_Imp_Proc getAD_Package_Imp_Proc() {
return null;
};
diff --git a/org.adempiere.base/src/org/adempiere/base/IDisplayTypeFactory.java b/org.adempiere.base/src/org/adempiere/base/IDisplayTypeFactory.java
index 90dbbec955..2e7ee07db4 100644
--- a/org.adempiere.base/src/org/adempiere/base/IDisplayTypeFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/IDisplayTypeFactory.java
@@ -18,40 +18,99 @@ import java.text.SimpleDateFormat;
import org.compiere.util.Language;
/**
+ * Interface for display type factory.
* @author Jan Thielemann - jan.thielemann@evenos-consulting.de
* @author evenos Consulting GmbH - www.evenos.org
*/
-
public interface IDisplayTypeFactory {
-
+ /**
+ * @param displayType
+ * @return true if displayType is of int ID type
+ */
public boolean isID(int displayType);
+
+ /**
+ * @param displayType
+ * @return true if displayType is of UUID type
+ */
public default boolean isUUID(int displayType) {
return false;
- };
+ }
+
+ /**
+ * @param displayType
+ * @return true if displayType is of numeric type
+ */
public boolean isNumeric(int displayType);
+
+ /**
+ * @param displayType
+ * @return default numeric precision for displayType
+ */
public Integer getDefaultPrecision(int displayType);
+
+ /**
+ * @param displayType
+ * @return true if displayType is of text type
+ */
public boolean isText(int displayType);
+
+ /**
+ * @param displayType
+ * @return true if displayType is of date type
+ */
public boolean isDate (int displayType);
public default boolean isList (int displayType) {
return false;
}
+
+ /**
+ * @param displayType
+ * @return true if displayType is of lookup type (usually a foreign key type)
+ */
public boolean isLookup(int displayType);
+
+ /**
+ * @param displayType
+ * @return true if displayType is of LOB type
+ */
public boolean isLOB (int displayType);
+
+ /**
+ * @param displayType
+ * @param language
+ * @param pattern
+ * @return DecimalFormat
+ */
public DecimalFormat getNumberFormat(int displayType, Language language, String pattern);
+
+ /**
+ * @param displayType
+ * @param language
+ * @param pattern
+ * @return SimpleDateFormat
+ */
public SimpleDateFormat getDateFormat (int displayType, Language language, String pattern);
+
+ /**
+ * @param displayType
+ * @param yesNoAsBoolean
+ * @return Java type for displayType
+ */
public Class> getClass (int displayType, boolean yesNoAsBoolean);
+
+ /**
+ * @param displayType
+ * @param columnName
+ * @param fieldLength
+ * @return SQL data type for displayType
+ */
public String getSQLDataType (int displayType, String columnName, int fieldLength);
+
+ /**
+ * @param displayType
+ * @return description for displayType
+ */
public String getDescription (int displayType);
}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/org.adempiere.base/src/org/adempiere/base/IDocFactory.java b/org.adempiere.base/src/org/adempiere/base/IDocFactory.java
index 37b0569ae3..b132c1385f 100644
--- a/org.adempiere.base/src/org/adempiere/base/IDocFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/IDocFactory.java
@@ -25,9 +25,8 @@ import org.compiere.util.DB;
import org.compiere.util.Env;
/**
- *
+ * Factory interface for {@link Doc}.
* @author hengsin
- *
*/
public interface IDocFactory {
diff --git a/org.adempiere.base/src/org/adempiere/base/IGridTabImporter.java b/org.adempiere.base/src/org/adempiere/base/IGridTabImporter.java
index 0849e01798..2827e513d7 100644
--- a/org.adempiere.base/src/org/adempiere/base/IGridTabImporter.java
+++ b/org.adempiere.base/src/org/adempiere/base/IGridTabImporter.java
@@ -23,14 +23,13 @@ import org.adempiere.util.IProcessUI;
import org.compiere.model.GridTab;
/**
- *
+ * Interface to import data to {@link GridTab}.
* @author Carlos Ruiz
- *
*/
public interface IGridTabImporter {
/**
- * export gridTab data to file
+ * Import data from filestream to gridTab
* @param gridTab
* @param childs
* @param filestream
@@ -39,14 +38,14 @@ public interface IGridTabImporter {
public File fileImport(GridTab gridTab, List childs, InputStream filestream, Charset charset, String importMode);
/**
- * export gridTab data to file
+ * Import data from filestream to gridTab
* @param gridTab
* @param childs
* @param filestream
* @param charset
* @param importMode
* @param processUI
- * @return
+ * @return File for import log
*/
public File fileImport(GridTab gridTab, List childs, InputStream filestream, Charset charset, String importMode, IProcessUI processUI);
diff --git a/org.adempiere.base/src/org/adempiere/base/IKeyStore.java b/org.adempiere.base/src/org/adempiere/base/IKeyStore.java
index 5c14f484d2..5d11d54372 100644
--- a/org.adempiere.base/src/org/adempiere/base/IKeyStore.java
+++ b/org.adempiere.base/src/org/adempiere/base/IKeyStore.java
@@ -16,14 +16,12 @@ package org.adempiere.base;
import javax.crypto.SecretKey;
/**
- *
+ * Interface for key store
* @author deepak
- *
*/
public interface IKeyStore {
/**
- *
* @param AD_Client_ID
* @return secret key
*/
diff --git a/org.adempiere.base/src/org/adempiere/base/ILookupFactory.java b/org.adempiere.base/src/org/adempiere/base/ILookupFactory.java
index d7ab2f9fa0..94399c2708 100644
--- a/org.adempiere.base/src/org/adempiere/base/ILookupFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/ILookupFactory.java
@@ -17,27 +17,27 @@ import org.compiere.model.InfoColumnVO;
import org.compiere.model.Lookup;
/**
+ * Factory interface for {@link Lookup}.
+ * For plugin that implement this as OSGi component, use property = {"service.ranking:Integer=1"} to set up a calling order
+ * that prioritizes your component over core component.
* @author Jan Thielemann - jan.thielemann@evenos.de
* @author evenos Consulting GmbH - www.evenos.org
*/
public interface ILookupFactory {
/**
- *
* @param gridFieldVO
* @return lookup instance
*/
public Lookup getLookup (GridFieldVO gridFieldVO);
/**
- *
* @param gridFieldVO
* @return true if the field's displaytype uses lookup
*/
public boolean isLookup(GridFieldVO gridFieldVO);
/**
- *
* @param infoColumnVO
* @return true if the field's displaytype uses lookup
*/
diff --git a/org.adempiere.base/src/org/adempiere/base/IMappedByNameFactory.java b/org.adempiere.base/src/org/adempiere/base/IMappedByNameFactory.java
index 19150bdd9b..ebd347c976 100644
--- a/org.adempiere.base/src/org/adempiere/base/IMappedByNameFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/IMappedByNameFactory.java
@@ -47,14 +47,12 @@ public interface IMappedByNameFactory {
public void removeMapping(String name);
/**
- *
* @param name
* @return {@link Supplier}
*/
public Supplier getSupplier(String name);
/**
- *
* @param name
* @return new instance of T (if there are register supplier for name)
*/
diff --git a/org.adempiere.base/src/org/adempiere/base/IMappedColumnCalloutFactory.java b/org.adempiere.base/src/org/adempiere/base/IMappedColumnCalloutFactory.java
index 0d73e29902..16ff32a3c9 100644
--- a/org.adempiere.base/src/org/adempiere/base/IMappedColumnCalloutFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/IMappedColumnCalloutFactory.java
@@ -26,10 +26,11 @@ package org.adempiere.base;
import java.util.function.Supplier;
+import org.adempiere.base.annotation.Callout;
import org.osgi.framework.BundleContext;
/**
- *
+ * Factory interface for mapping of tableName+columnName to {@link IColumnCallout} implementation.
* @author hengsin
*
*/
@@ -52,7 +53,7 @@ public interface IMappedColumnCalloutFactory {
public void removeMapping(String tableName, String columnName, Supplier supplier);
/**
- * scan, discover and register classes with Callout annotation
+ * scan, discover and register classes with {@link Callout} annotation
* @param context
* @param packages
*/
diff --git a/org.adempiere.base/src/org/adempiere/base/IMappedDocumentFactory.java b/org.adempiere.base/src/org/adempiere/base/IMappedDocumentFactory.java
index 27cb2cc2c2..1fb5ce0f8d 100644
--- a/org.adempiere.base/src/org/adempiere/base/IMappedDocumentFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/IMappedDocumentFactory.java
@@ -31,7 +31,7 @@ import org.compiere.acct.Doc;
import org.compiere.model.MAcctSchema;
/**
- *
+ * Factory interface for mapping between tableName+gaap to {@link Doc} implementation.
* @author hengsin
*
*/
@@ -46,7 +46,7 @@ public interface IMappedDocumentFactory {
public void addMapping(String gaap, String tableName, Function supplier);
/**
- *
+ * Remove mapping
* @param gaap
* @param tableName
*/
diff --git a/org.adempiere.base/src/org/adempiere/base/IModelValidatorFactory.java b/org.adempiere.base/src/org/adempiere/base/IModelValidatorFactory.java
index b887332e12..f9e5a04cf2 100644
--- a/org.adempiere.base/src/org/adempiere/base/IModelValidatorFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/IModelValidatorFactory.java
@@ -16,7 +16,7 @@ package org.adempiere.base;
import org.compiere.model.ModelValidator;
/**
- *
+ * Factory interface for {@link ModelValidator}.
* @author hengsin
*
*/
@@ -24,7 +24,7 @@ public interface IModelValidatorFactory {
/**
* @param className
- * @return new modelvalidator intance
+ * @return new ModelValidator instance
*/
public ModelValidator newModelValidatorInstance(String className);
}
diff --git a/org.adempiere.base/src/org/adempiere/base/IPaymentExporterFactory.java b/org.adempiere.base/src/org/adempiere/base/IPaymentExporterFactory.java
index 3397bf572a..8ad59c0732 100644
--- a/org.adempiere.base/src/org/adempiere/base/IPaymentExporterFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/IPaymentExporterFactory.java
@@ -16,14 +16,14 @@ package org.adempiere.base;
import org.compiere.util.PaymentExport;
/**
- * PaymentExporter factory interface.
+ * Factory interface for {@link PaymentExport}.
* @author mbozem
*/
public interface IPaymentExporterFactory {
/**
* @param className
- * @return payment exporter instance
+ * @return new PaymentExport instance
*/
public PaymentExport newPaymentExporterInstance(String className);
}
diff --git a/org.adempiere.base/src/org/adempiere/base/IPaymentProcessorFactory.java b/org.adempiere.base/src/org/adempiere/base/IPaymentProcessorFactory.java
index 30cc7c9f42..ea321f0014 100644
--- a/org.adempiere.base/src/org/adempiere/base/IPaymentProcessorFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/IPaymentProcessorFactory.java
@@ -16,15 +16,14 @@ package org.adempiere.base;
import org.compiere.model.PaymentProcessor;
/**
- *
+ * Factory interface for {@link PaymentProcessor}.
* @author hengsin
- *
*/
public interface IPaymentProcessorFactory {
/**
* @param className
- * @return payment processor instance
+ * @return new PaymentProcessor instance
*/
public PaymentProcessor newPaymentProcessorInstance(String className);
}
diff --git a/org.adempiere.base/src/org/adempiere/base/IProcessFactory.java b/org.adempiere.base/src/org/adempiere/base/IProcessFactory.java
index 3f71656a96..e8fdd3ca4b 100644
--- a/org.adempiere.base/src/org/adempiere/base/IProcessFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/IProcessFactory.java
@@ -16,16 +16,15 @@ package org.adempiere.base;
import org.compiere.process.ProcessCall;
/**
- *
+ * Factory interface for {@link ProcessCall}.
* @author hengsin
- *
*/
public interface IProcessFactory {
/**
* Create new process instance
* @param className
- * @return new process instance
+ * @return new ProcessCall instance
*/
public ProcessCall newProcessInstance(String className);
diff --git a/org.adempiere.base/src/org/adempiere/base/IProductPricing.java b/org.adempiere.base/src/org/adempiere/base/IProductPricing.java
index fd3eecd6b3..cf8033342f 100644
--- a/org.adempiere.base/src/org/adempiere/base/IProductPricing.java
+++ b/org.adempiere.base/src/org/adempiere/base/IProductPricing.java
@@ -23,7 +23,7 @@ import org.compiere.model.I_M_RMALine;
import org.compiere.model.I_M_RequisitionLine;
/**
- * Product Price Calculations
+ * Interface for Product Price Calculations
*/
public interface IProductPricing {
diff --git a/org.adempiere.base/src/org/adempiere/base/IProductPricingFactory.java b/org.adempiere.base/src/org/adempiere/base/IProductPricingFactory.java
index 846929a6c2..52540fb326 100644
--- a/org.adempiere.base/src/org/adempiere/base/IProductPricingFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/IProductPricingFactory.java
@@ -13,8 +13,14 @@
*****************************************************************************/
package org.adempiere.base;
+/**
+ * Factory interface for {@link AbstractProductPricing}.
+ */
public interface IProductPricingFactory {
+ /**
+ * @return new AbstractProductPricing instance
+ */
public AbstractProductPricing newProductPricingInstance();
}
diff --git a/org.adempiere.base/src/org/adempiere/base/IReplenishFactory.java b/org.adempiere.base/src/org/adempiere/base/IReplenishFactory.java
index 25ca46f313..f7ad3f8896 100644
--- a/org.adempiere.base/src/org/adempiere/base/IReplenishFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/IReplenishFactory.java
@@ -11,9 +11,8 @@ import org.compiere.util.ReplenishInterface;
public interface IReplenishFactory {
/**
- *
* @param className
- * @return Replenish instance
+ * @return new ReplenishInterface instance
*/
public ReplenishInterface newReplenishInstance(String className);
}
diff --git a/org.adempiere.base/src/org/adempiere/base/IResourceFinder.java b/org.adempiere.base/src/org/adempiere/base/IResourceFinder.java
index a99ea7b76b..a3b499a0e9 100644
--- a/org.adempiere.base/src/org/adempiere/base/IResourceFinder.java
+++ b/org.adempiere.base/src/org/adempiere/base/IResourceFinder.java
@@ -18,8 +18,15 @@ package org.adempiere.base;
import java.net.URL;
+/**
+ * Service interface to find resource by name
+ */
public interface IResourceFinder {
+ /**
+ * @param name
+ * @return URL for resource found or null
+ */
URL getResource(String name);
}
diff --git a/org.adempiere.base/src/org/adempiere/base/IServiceHolder.java b/org.adempiere.base/src/org/adempiere/base/IServiceHolder.java
index 3790199215..edd1fa7ce1 100644
--- a/org.adempiere.base/src/org/adempiere/base/IServiceHolder.java
+++ b/org.adempiere.base/src/org/adempiere/base/IServiceHolder.java
@@ -14,7 +14,7 @@
package org.adempiere.base;
/**
- *
+ * Holder interface for dynamic service
* @author hengsin
*
* @param
diff --git a/org.adempiere.base/src/org/adempiere/base/IServiceLocator.java b/org.adempiere.base/src/org/adempiere/base/IServiceLocator.java
index 9ca8d48daa..a882c1f295 100644
--- a/org.adempiere.base/src/org/adempiere/base/IServiceLocator.java
+++ b/org.adempiere.base/src/org/adempiere/base/IServiceLocator.java
@@ -17,33 +17,30 @@
package org.adempiere.base;
/**
- * A service locator looks up services.
- * This is the central authority for adempiere service definition,
- * because each service defined has to be looked up via this interface.
- *
- * A service in adempiere is an implementation for the registered interface, expose through osgi service registry
+ * Interface for dynamic discovery of services.
+ * This is the primary entry point for iDempiere service discovery.
*
* @author viola
*
*/
public interface IServiceLocator {
/**
- *
+ * Locate matching service by type (order by service.ranking priority)
* @param type service interface
* @return holder for dynamic service
*/
IServiceHolder locate(Class type);
/**
- *
+ * Locate matching service by type and query expression
* @param type
* @param query
- * @return
+ * @return holder for service
*/
IServiceHolder locate(Class type, ServiceQuery query);
/**
- *
+ * Locate matching service by component name and query expression
* @param type
* @param componentName service component name
* @param query
@@ -52,14 +49,14 @@ public interface IServiceLocator {
IServiceHolder locate(Class type, String componentName, ServiceQuery query);
/**
- *
+ * Find all matching services by type
* @param type
* @return holder for list of dynamic service
*/
IServicesHolder list(Class type);
/**
- *
+ * Find all matching services by type and query expression
* @param type
* @param query
* @return holder for list of dynamic service
@@ -67,7 +64,7 @@ public interface IServiceLocator {
IServicesHolder list(Class type, ServiceQuery query);
/**
- *
+ * Find all matching services by component name and query expression
* @param type
* @param componentName osgi service component name
* @param query
diff --git a/org.adempiere.base/src/org/adempiere/base/IServiceReferenceHolder.java b/org.adempiere.base/src/org/adempiere/base/IServiceReferenceHolder.java
index 46b8097a58..171d5f33d1 100644
--- a/org.adempiere.base/src/org/adempiere/base/IServiceReferenceHolder.java
+++ b/org.adempiere.base/src/org/adempiere/base/IServiceReferenceHolder.java
@@ -27,8 +27,8 @@ package org.adempiere.base;
import org.osgi.framework.ServiceReference;
/**
- * Dynamic service reference holder for a service object.
- * For cache usage, you should cache this instead of service object
+ * Service reference holder for a service object.
+ * For caching of service, you should cache this instead of the service object.
* @author hengsin
*
* @param
diff --git a/org.adempiere.base/src/org/adempiere/base/IServicesHolder.java b/org.adempiere.base/src/org/adempiere/base/IServicesHolder.java
index 5f8bd566d5..1b3bee4c0a 100644
--- a/org.adempiere.base/src/org/adempiere/base/IServicesHolder.java
+++ b/org.adempiere.base/src/org/adempiere/base/IServicesHolder.java
@@ -16,7 +16,7 @@ package org.adempiere.base;
import java.util.List;
/**
- *
+ * Holder interface for list of service
* @author hengsin
*
* @param
diff --git a/org.adempiere.base/src/org/adempiere/base/IShipmentProcessorFactory.java b/org.adempiere.base/src/org/adempiere/base/IShipmentProcessorFactory.java
index f874d9c9d9..3c2b094664 100644
--- a/org.adempiere.base/src/org/adempiere/base/IShipmentProcessorFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/IShipmentProcessorFactory.java
@@ -16,16 +16,15 @@ package org.adempiere.base;
import org.adempiere.model.IShipmentProcessor;
/**
- *
+ * Factory interface for {@link IShipmentProcessor}.
* @author hengsin
- *
*/
public interface IShipmentProcessorFactory {
/**
* Create new shipment processor instance
* @param className
- * @return shipment processor instance
+ * @return new IShipmentProcessor instance
*/
public IShipmentProcessor newShipmentProcessorInstance(String className);
}
diff --git a/org.adempiere.base/src/org/adempiere/base/ITaxLookup.java b/org.adempiere.base/src/org/adempiere/base/ITaxLookup.java
index 147adb623f..7c3fe161e2 100644
--- a/org.adempiere.base/src/org/adempiere/base/ITaxLookup.java
+++ b/org.adempiere.base/src/org/adempiere/base/ITaxLookup.java
@@ -28,9 +28,8 @@ import java.sql.Timestamp;
import java.util.Properties;
/**
- * Interface to lookup C_Tax record id
+ * Interface to lookup C_Tax record id (C_Tax_ID)
* @author hengsin
- *
*/
public interface ITaxLookup {
diff --git a/org.adempiere.base/src/org/adempiere/base/ITaxProviderFactory.java b/org.adempiere.base/src/org/adempiere/base/ITaxProviderFactory.java
index d0356a4fd5..126efb6856 100644
--- a/org.adempiere.base/src/org/adempiere/base/ITaxProviderFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/ITaxProviderFactory.java
@@ -18,14 +18,13 @@ import org.adempiere.model.ITaxProvider;
/**
* Tax provider factory interface
* @author Elaine
- *
*/
public interface ITaxProviderFactory {
/**
* Create new tax provider instance
* @param className
- * @return tax provider instance
+ * @return new ITaxProvider instance
*/
public ITaxProvider newTaxProviderInstance(String className);
}
diff --git a/org.adempiere.base/src/org/adempiere/base/MappedColumnCalloutFactory.java b/org.adempiere.base/src/org/adempiere/base/MappedColumnCalloutFactory.java
index b39479a962..6ae84ba6dc 100644
--- a/org.adempiere.base/src/org/adempiere/base/MappedColumnCalloutFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/MappedColumnCalloutFactory.java
@@ -45,9 +45,8 @@ import io.github.classgraph.ClassInfo;
import io.github.classgraph.ScanResult;
/**
- *
+ * Default implementation of {@link IMappedColumnCalloutFactory} for core.
* @author hengsin
- *
*/
@Component(name = "org.adempiere.base.MappedColumnCalloutFactory",
immediate = true,
@@ -117,6 +116,9 @@ public class MappedColumnCalloutFactory implements IColumnCalloutFactory, IMappe
}
}
+ /**
+ * For plugin to lookup this service by component name and call this method to register annotated callout classes.
+ */
@Override
public void scan(BundleContext context, String... packages) {
ClassLoader classLoader = context.getBundle().adapt(BundleWiring.class).getClassLoader();
diff --git a/org.adempiere.base/src/org/adempiere/base/MappedDocumentFactory.java b/org.adempiere.base/src/org/adempiere/base/MappedDocumentFactory.java
index 0b83da8a53..fb255b97aa 100644
--- a/org.adempiere.base/src/org/adempiere/base/MappedDocumentFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/MappedDocumentFactory.java
@@ -35,17 +35,16 @@ import org.compiere.util.Env;
import org.compiere.util.Util;
import org.osgi.service.component.annotations.Component;
-@Component(name = "org.adempiere.base.MappedDocumentFactory",
- service = {IDocFactory.class, IMappedDocumentFactory.class},
- immediate = true,
- property = {"service.ranking:Integer=1", "gaap=*"})
/**
- *
- * Document factory backed by map between tablename + gaap and lambda function object.
+ * Document factory backed by map between tablename + gaap and lambda function object.
* If you create a subclass of this and register it as osgi service, don't register for the IMappedDocumentFactory interface.
* @author hengsin
*
*/
+@Component(name = "org.adempiere.base.MappedDocumentFactory",
+ service = {IDocFactory.class, IMappedDocumentFactory.class},
+ immediate = true,
+ property = {"service.ranking:Integer=1", "gaap=*"})
public class MappedDocumentFactory implements IDocFactory, IMappedDocumentFactory {
private final ConcurrentHashMap> documentMap = new ConcurrentHashMap<>();
diff --git a/org.adempiere.base/src/org/adempiere/base/Model.java b/org.adempiere.base/src/org/adempiere/base/Model.java
index 56059c903f..221f62ab71 100644
--- a/org.adempiere.base/src/org/adempiere/base/Model.java
+++ b/org.adempiere.base/src/org/adempiere/base/Model.java
@@ -28,7 +28,7 @@ public @interface Model {
/**
* Table name
- * @return
+ * @return table name
*/
String table();
diff --git a/org.adempiere.base/src/org/adempiere/base/Service.java b/org.adempiere.base/src/org/adempiere/base/Service.java
index 9a5af7d723..8267327a33 100644
--- a/org.adempiere.base/src/org/adempiere/base/Service.java
+++ b/org.adempiere.base/src/org/adempiere/base/Service.java
@@ -29,8 +29,7 @@ public class Service {
private static IServiceLocator theLocator = new DynamicServiceLocator();
/**
- *
- * @return service locator instance
+ * @return IServiceLocator instance
*/
public static IServiceLocator locator() {
return theLocator;
diff --git a/org.adempiere.base/src/org/adempiere/base/annotation/Callout.java b/org.adempiere.base/src/org/adempiere/base/annotation/Callout.java
index a3120dad41..66069d87a3 100644
--- a/org.adempiere.base/src/org/adempiere/base/annotation/Callout.java
+++ b/org.adempiere.base/src/org/adempiere/base/annotation/Callout.java
@@ -32,8 +32,9 @@ import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
- * Annotation for Column Callout. This should only be used with class that implements the IColumnCallout interface.
- * You can repeat the annotation multiple time for different table and column name combination
+ * Annotation for Column Callout.
+ * This should only be used for class that implements the IColumnCallout interface.
+ * You can repeat the annotation multiple time for different table and column name combination.
* Note that you can't use * for both tableName and columnName attribute.
* @author hengsin
*
diff --git a/org.adempiere.base/src/org/adempiere/base/annotation/EventTopicDelegate.java b/org.adempiere.base/src/org/adempiere/base/annotation/EventTopicDelegate.java
index 667a0010be..09120ff67f 100644
--- a/org.adempiere.base/src/org/adempiere/base/annotation/EventTopicDelegate.java
+++ b/org.adempiere.base/src/org/adempiere/base/annotation/EventTopicDelegate.java
@@ -33,11 +33,9 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.annotations.EventDelegate;
/**
- *
- * Annotation for OSGi Event Topic Delegate.
+ * Annotation for OSGi Event Topic Delegate.
* Works with {@link EventDelegate} and its sub classes
* @author hengsin
- *
*/
@Retention(RUNTIME)
@Target(ElementType.TYPE)
diff --git a/org.adempiere.base/src/org/adempiere/base/annotation/ImportEventTopic.java b/org.adempiere.base/src/org/adempiere/base/annotation/ImportEventTopic.java
index 8df3d89ee1..4e8e409a2f 100644
--- a/org.adempiere.base/src/org/adempiere/base/annotation/ImportEventTopic.java
+++ b/org.adempiere.base/src/org/adempiere/base/annotation/ImportEventTopic.java
@@ -33,8 +33,8 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.annotations.imp.ImportEventDelegate;
/**
- * Define parameter for {@link ImportEventDelegate}
- * Works with classes with {@link EventTopicDelegate} annotation
+ * Specify parameter for {@link ImportEventDelegate}.
+ * Works with classes with {@link EventTopicDelegate} annotation.
* @author hengsin
*
*/
diff --git a/org.adempiere.base/src/org/adempiere/base/annotation/ModelEventTopic.java b/org.adempiere.base/src/org/adempiere/base/annotation/ModelEventTopic.java
index 2c0cdb4176..d23df8ed74 100644
--- a/org.adempiere.base/src/org/adempiere/base/annotation/ModelEventTopic.java
+++ b/org.adempiere.base/src/org/adempiere/base/annotation/ModelEventTopic.java
@@ -34,8 +34,8 @@ import org.adempiere.base.event.annotations.ModelEventDelegate;
import org.compiere.model.PO;
/**
- * Specify parameter for {@link ModelEventDelegate}
- * Works with classes with {@link EventTopicDelegate} annotation
+ * Specify parameter for {@link ModelEventDelegate}.
+ * Works with classes with {@link EventTopicDelegate} annotation.
* @author hengsin
*
*/
diff --git a/org.adempiere.base/src/org/adempiere/base/annotation/Parameter.java b/org.adempiere.base/src/org/adempiere/base/annotation/Parameter.java
index 9412a0acf4..d5d0a8c46b 100644
--- a/org.adempiere.base/src/org/adempiere/base/annotation/Parameter.java
+++ b/org.adempiere.base/src/org/adempiere/base/annotation/Parameter.java
@@ -22,16 +22,16 @@ import org.compiere.model.X_AD_Process_Para;
import org.compiere.process.SvrProcess;
/**
- * Tags a process class field as a process parameter in order to have its value set automatically.
+ * Tags a process class field as a process parameter in order to have its value set automatically.
* Class fields are matched against process parameters using the following heuristics:
* [1] If the parameter annotation has a name, then it must match exactly the process parameter
* metadata definition. For example:
* @Parameter(name="C_BPartner_ID") int foo will fill foo with
* the value of the parameter named C_BPartner_ID.
* [2] Class fields with the p_ prefix will be matched automatically. Example:
- * @Parameter Integer p_C_BPartner_ID will match a parameter named C_BPartner_ID.
+ * @Parameter Integer p_C_BPartner_ID will match a parameter named C_BPartner_ID.
* [3] Fields with their names matching metadata names after stripping the "_" character. Example:
- * @Parameter Integer cBPartnerId will match a parameter named C_BPartner_ID.
+ * @Parameter Integer cBPartnerId will match a parameter named C_BPartner_ID.
* [4] Fields with their names matching exactly their metadata names. Example:
* @Parameter Integer C_BPartner_ID will match a parameter named C_BPartner_ID.
* @see SvrProcess
diff --git a/org.adempiere.base/src/org/adempiere/base/annotation/Process.java b/org.adempiere.base/src/org/adempiere/base/annotation/Process.java
index 7115156b91..adfde08c8d 100644
--- a/org.adempiere.base/src/org/adempiere/base/annotation/Process.java
+++ b/org.adempiere.base/src/org/adempiere/base/annotation/Process.java
@@ -1,3 +1,15 @@
+/******************************************************************************
+ * Product: iDempiere ERP & CRM Smart Business Solution *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. This program is distributed in the hope *
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
+ * See the GNU General Public License for more details. *
+ * You should have received a copy of the GNU General Public License along *
+ * with this program; if not, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ *****************************************************************************/
package org.adempiere.base.annotation;
import static java.lang.annotation.ElementType.TYPE;
diff --git a/org.adempiere.base/src/org/adempiere/base/annotation/ProcessEventTopic.java b/org.adempiere.base/src/org/adempiere/base/annotation/ProcessEventTopic.java
index aeac806a63..1fd1c4250c 100644
--- a/org.adempiere.base/src/org/adempiere/base/annotation/ProcessEventTopic.java
+++ b/org.adempiere.base/src/org/adempiere/base/annotation/ProcessEventTopic.java
@@ -33,8 +33,8 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.annotations.process.ProcessEventDelegate;
/**
- * Define parameter for {@link ProcessEventDelegate}
- * Works with classes with {@link EventTopicDelegate} annotation
+ * Specify parameter for {@link ProcessEventDelegate}.
+ * Works with classes with {@link EventTopicDelegate} annotation.
* @author hengsin
*
*/
@@ -43,7 +43,7 @@ import org.adempiere.base.event.annotations.process.ProcessEventDelegate;
public @interface ProcessEventTopic {
/**
* AD_Process.AD_Process_UU (uuid) value for {@link ProcessEventDelegate}
- * @return process uuid
+ * @return AD_Process_UU
*/
String processUUID();
}
diff --git a/org.adempiere.base/src/org/adempiere/base/ds/DynamicServiceHolder.java b/org.adempiere.base/src/org/adempiere/base/ds/DynamicServiceHolder.java
index de9dc2d537..debd99325b 100644
--- a/org.adempiere.base/src/org/adempiere/base/ds/DynamicServiceHolder.java
+++ b/org.adempiere.base/src/org/adempiere/base/ds/DynamicServiceHolder.java
@@ -25,8 +25,8 @@ import org.osgi.framework.ServiceReference;
import org.osgi.util.tracker.ServiceTracker;
/**
+ * Holder for OSGI service. Implemented using {@link ServiceTracker}.
* @author hengsin
- *
*/
public class DynamicServiceHolder implements IServiceHolder, IServicesHolder {
diff --git a/org.adempiere.base/src/org/adempiere/base/ds/DynamicServiceLocator.java b/org.adempiere.base/src/org/adempiere/base/ds/DynamicServiceLocator.java
index 3690d9527e..337ca84a4e 100644
--- a/org.adempiere.base/src/org/adempiere/base/ds/DynamicServiceLocator.java
+++ b/org.adempiere.base/src/org/adempiere/base/ds/DynamicServiceLocator.java
@@ -24,13 +24,13 @@ import org.osgi.service.component.ComponentConstants;
import org.osgi.util.tracker.ServiceTracker;
/**
+ * Service locator implementation for OSGi service.
* @author hengsin
- *
*/
public class DynamicServiceLocator implements IServiceLocator {
/**
- *
+ * default constructor
*/
public DynamicServiceLocator() {
}
@@ -109,6 +109,13 @@ public class DynamicServiceLocator implements IServiceLocator {
return new DynamicServiceHolder(tracker);
}
+ /**
+ * Create service query filter
+ * @param type
+ * @param serviceId
+ * @param query
+ * @return Filter
+ */
private Filter filter(Class> type, String serviceId, ServiceQuery query) {
StringBuilder builder = new StringBuilder("(&(objectclass=");
builder.append(type.getName()).append(")");
diff --git a/org.adempiere.base/src/org/adempiere/base/ds/DynamicServiceReference.java b/org.adempiere.base/src/org/adempiere/base/ds/DynamicServiceReference.java
index e73b58b5b2..7fc3097957 100644
--- a/org.adempiere.base/src/org/adempiere/base/ds/DynamicServiceReference.java
+++ b/org.adempiere.base/src/org/adempiere/base/ds/DynamicServiceReference.java
@@ -29,7 +29,7 @@ import org.osgi.framework.ServiceReference;
import org.osgi.util.tracker.ServiceTracker;
/**
- * IServiceReferenceHolder implementation using ServiceTracker
+ * IServiceReferenceHolder for OSGi service, implemented using {@link ServiceTracker}
* @author hengsin
*
* @param
diff --git a/org.adempiere.base/src/org/adempiere/base/ds/ServiceRankingComparator.java b/org.adempiere.base/src/org/adempiere/base/ds/ServiceRankingComparator.java
index 64990d8db8..41aaff8237 100644
--- a/org.adempiere.base/src/org/adempiere/base/ds/ServiceRankingComparator.java
+++ b/org.adempiere.base/src/org/adempiere/base/ds/ServiceRankingComparator.java
@@ -31,13 +31,13 @@ import org.osgi.framework.Constants;
import org.osgi.framework.ServiceReference;
/**
- * Service Reference Comparator.
+ * Service Reference Comparator.
* This comparator follows OSGi Ranking policy.
* @author hengsin
*/
public final class ServiceRankingComparator implements Comparator>, Serializable {
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 3444598255961708618L;
@@ -57,6 +57,7 @@ public final class ServiceRankingComparator implements Comparator serviceReference1, ServiceReference> serviceReference2) {
if (serviceReference1.equals(serviceReference2)) { return 0; }
diff --git a/org.adempiere.base/src/org/adempiere/base/equinox/EquinoxExtensionHolder.java b/org.adempiere.base/src/org/adempiere/base/equinox/EquinoxExtensionHolder.java
index 3a92956ed8..9e9c4f9d69 100644
--- a/org.adempiere.base/src/org/adempiere/base/equinox/EquinoxExtensionHolder.java
+++ b/org.adempiere.base/src/org/adempiere/base/equinox/EquinoxExtensionHolder.java
@@ -16,6 +16,7 @@ package org.adempiere.base.equinox;
import java.util.List;
/**
+ * Holder for list of Equinox extension.
* @author hengsin
*
*/
diff --git a/org.adempiere.base/src/org/adempiere/base/equinox/EquinoxExtensionLocator.java b/org.adempiere.base/src/org/adempiere/base/equinox/EquinoxExtensionLocator.java
index 7abb64cb4f..a644e30ba6 100644
--- a/org.adempiere.base/src/org/adempiere/base/equinox/EquinoxExtensionLocator.java
+++ b/org.adempiere.base/src/org/adempiere/base/equinox/EquinoxExtensionLocator.java
@@ -20,8 +20,8 @@ import org.adempiere.base.ServiceQuery;
/**
- * This is the Equinox implementation of extension Locator.
- * It delegates work to the ExtensionList that lookups up extensions.
+ * This is the Equinox implementation of extension Locator.
+ * It delegates work to the ExtensionList that lookups up extensions.
* Usually, the ids of extension points correspond to the interface names of the services.
*
* @author viola
@@ -33,12 +33,14 @@ public class EquinoxExtensionLocator {
private EquinoxExtensionLocator() {}
+ /**
+ * @return EquinoxExtensionLocator singleton instance
+ */
public static EquinoxExtensionLocator instance() {
return INSTANCE;
}
/**
- *
* @param type
* @return equinox extension holder
*/
@@ -47,7 +49,6 @@ public class EquinoxExtensionLocator {
}
/**
- *
* @param type
* @param extensionPointId
* @return equinox extension holder
@@ -58,7 +59,6 @@ public class EquinoxExtensionLocator {
}
/**
- *
* @param type
* @param query
* @return equinox extension holder
@@ -68,7 +68,6 @@ public class EquinoxExtensionLocator {
}
/**
- *
* @param type
* @param extensionId
* @param query
@@ -80,7 +79,6 @@ public class EquinoxExtensionLocator {
}
/**
- *
* @param type
* @param extensionPointId
* @param extensionId
@@ -94,7 +92,6 @@ public class EquinoxExtensionLocator {
}
/**
- *
* @param type
* @return equinox extension holder
*/
@@ -103,7 +100,6 @@ public class EquinoxExtensionLocator {
}
/**
- *
* @param type
* @param extensionPointId
* @return equinox extension holder
@@ -114,7 +110,6 @@ public class EquinoxExtensionLocator {
}
/**
- *
* @param type
* @param query
* @return equinox extension holder
@@ -124,7 +119,6 @@ public class EquinoxExtensionLocator {
}
/**
- *
* @param type
* @param extensionId
* @param query
@@ -136,7 +130,6 @@ public class EquinoxExtensionLocator {
}
/**
- *
* @param type
* @param extensionPointId
* @param extensionId
diff --git a/org.adempiere.base/src/org/adempiere/base/equinox/ExtensionList.java b/org.adempiere.base/src/org/adempiere/base/equinox/ExtensionList.java
index e7ee533faa..d8a51f6533 100644
--- a/org.adempiere.base/src/org/adempiere/base/equinox/ExtensionList.java
+++ b/org.adempiere.base/src/org/adempiere/base/equinox/ExtensionList.java
@@ -29,11 +29,11 @@ import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.Platform;
/**
- * This List looks up services as extensions in equinox.
- * The extension point must be the class name of the service interface.
+ * This List looks up services as extensions in equinox.
+ * The extension point must be the class name of the service interface.
* The query attributes are checked against the attributes
* of the extension configuration element.
- *
+ *
* In order to minimize equinox lookups, a filtering iterator is used.
* @author viola
*
@@ -41,15 +41,23 @@ import org.eclipse.core.runtime.Platform;
*/
public class ExtensionList implements Iterable{
+ /**
+ * Iterator implementation for Equinox extension
+ * @param
+ */
public class ExtensionIterator implements Iterator {
private int index = 0;
+ @Override
public boolean hasNext() {
iterateUntilAccepted();
return index implements Iterable{
}
}
+ /**
+ * @param element
+ * @return true if current element match extension id or filter parameter
+ */
private boolean accept(IConfigurationElement element) {
if (extensionId != null) {
String id = element.getDeclaringExtension().getUniqueIdentifier();
@@ -74,6 +86,7 @@ public class ExtensionList implements Iterable{
}
@SuppressWarnings("unchecked")
+ @Override
public E next() {
iterateUntilAccepted();
IConfigurationElement e = elements[index++];
@@ -95,6 +108,10 @@ public class ExtensionList implements Iterable{
}
}
+ /**
+ * Not supported, will throw exception.
+ */
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
@@ -123,6 +140,12 @@ public class ExtensionList implements Iterable{
}
}
+ /**
+ * @param type
+ * @param extensionPointId
+ * @param extensionId
+ * @param query
+ */
public ExtensionList(Class type, String extensionPointId, String extensionId, ServiceQuery query) {
this(type, extensionPointId);
this.extensionId = extensionId;
@@ -133,6 +156,11 @@ public class ExtensionList implements Iterable{
}
}
+ /**
+ * Sort by extension priority (if defined in extensions-priorty.properties).
+ * @param elementArray
+ * @return sorted elementArray
+ */
private IConfigurationElement[] sort(IConfigurationElement[] elementArray) {
IConfigurationElement[] result = elementArray;
TreeMap> elementMap = new TreeMap>();
@@ -169,14 +197,25 @@ public class ExtensionList implements Iterable{
return result;
}
+ /**
+ * @return Iterator
+ */
public Iterator iterator() {
return new ExtensionIterator();
}
+ /**
+ * add filter for discovery of extensions
+ * @param attribute
+ * @param value
+ */
public void addFilter(String attribute, String value) {
filters.put(attribute, value);
}
+ /**
+ * @return first matching extension
+ */
public T first() {
Iterator i = iterator();
if (!i.hasNext())
@@ -184,6 +223,9 @@ public class ExtensionList implements Iterable{
return i.next();
}
+ /**
+ * @return list of matching extension
+ */
public List asList() {
List result = new ArrayList();
for (T t : this) {
diff --git a/org.adempiere.base/src/org/adempiere/base/equinox/ExtensionPriorityManager.java b/org.adempiere.base/src/org/adempiere/base/equinox/ExtensionPriorityManager.java
index 7df6c951a8..423afdc4c7 100644
--- a/org.adempiere.base/src/org/adempiere/base/equinox/ExtensionPriorityManager.java
+++ b/org.adempiere.base/src/org/adempiere/base/equinox/ExtensionPriorityManager.java
@@ -25,7 +25,7 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.osgi.service.datalocation.Location;
/**
- *
+ * Load extension priority from extensions-priorty.properties
* @author hengsin
*
*/
diff --git a/org.adempiere.base/src/org/adempiere/base/equinox/StackTraceCommand.java b/org.adempiere.base/src/org/adempiere/base/equinox/StackTraceCommand.java
index 2d6be54feb..7951e4386d 100644
--- a/org.adempiere.base/src/org/adempiere/base/equinox/StackTraceCommand.java
+++ b/org.adempiere.base/src/org/adempiere/base/equinox/StackTraceCommand.java
@@ -19,16 +19,15 @@ import org.eclipse.osgi.framework.console.CommandProvider;
import org.eclipse.osgi.framework.console.CommandInterpreter;
/**
+ * OSGi console command for printing of stack trace.
* @author hengsin
- *
*/
public class StackTraceCommand implements CommandProvider {
/**
- *
+ * default constructor
*/
public StackTraceCommand() {
- // TODO Auto-generated constructor stub
}
/* (non-Javadoc)
diff --git a/org.adempiere.base/src/org/adempiere/base/event/AbstractEventHandler.java b/org.adempiere.base/src/org/adempiere/base/event/AbstractEventHandler.java
index b37985ccec..f9128e8f66 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/AbstractEventHandler.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/AbstractEventHandler.java
@@ -23,6 +23,7 @@ import org.osgi.service.event.Event;
import org.osgi.service.event.EventHandler;
/**
+ * Base class to help simplify implementation of OSGi {@link EventHandler}.
* @author hengsin
*
*/
@@ -79,13 +80,13 @@ public abstract class AbstractEventHandler implements EventHandler {
}
/**
- * override this method to handle event
+ * Sub class should override this method to handle event.
* @param event
*/
protected abstract void doHandleEvent(Event event);
/**
- * override this method to register event that the class want to listen to
+ * Sub class should override this method to register event that the class want to listen to
*/
protected abstract void initialize();
diff --git a/org.adempiere.base/src/org/adempiere/base/event/EventHelper.java b/org.adempiere.base/src/org/adempiere/base/event/EventHelper.java
index de95c8a395..9fbf520809 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/EventHelper.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/EventHelper.java
@@ -32,7 +32,7 @@ import org.compiere.util.CLogger;
import org.osgi.service.event.Event;
/**
- * Helper methods for event handler
+ * Helper methods for {@link AbstractEventHandler}.
* @author hengsin
*/
public final class EventHelper {
@@ -66,7 +66,6 @@ public final class EventHelper {
}
/**
- *
* @param
* @param event
*/
@@ -75,7 +74,6 @@ public final class EventHelper {
}
/**
- *
* @param
* @param event
* @param property
diff --git a/org.adempiere.base/src/org/adempiere/base/event/EventManager.java b/org.adempiere.base/src/org/adempiere/base/event/EventManager.java
index 331499e2f8..e6d9838162 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/EventManager.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/EventManager.java
@@ -43,7 +43,7 @@ import org.osgi.service.event.EventConstants;
import org.osgi.service.event.EventHandler;
/**
- * Simple wrapper for the osgi event admin service.
+ * Simple wrapper for the osgi event admin service.
* Usage: EventManager.getInstance().sendEvent/postEvent
* @author hengsin
*
diff --git a/org.adempiere.base/src/org/adempiere/base/event/FactsEventData.java b/org.adempiere.base/src/org/adempiere/base/event/FactsEventData.java
index 2bb920980d..bb6d225190 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/FactsEventData.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/FactsEventData.java
@@ -15,14 +15,14 @@ package org.adempiere.base.event;
import java.util.List;
+import org.adempiere.base.event.annotations.doc.FactsValidateDelegate;
import org.compiere.acct.Fact;
import org.compiere.model.MAcctSchema;
import org.compiere.model.PO;
/**
- *
+ * Event data for {@link FactsValidateDelegate}.
* @author hengsin
- *
*/
public class FactsEventData implements POEventData {
private MAcctSchema acctSchema;
diff --git a/org.adempiere.base/src/org/adempiere/base/event/IEventManager.java b/org.adempiere.base/src/org/adempiere/base/event/IEventManager.java
index 1b5093f301..6208b7f4d9 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/IEventManager.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/IEventManager.java
@@ -18,9 +18,8 @@ import org.osgi.service.event.Event;
import org.osgi.service.event.EventHandler;
/**
- *
+ * Interface for global event manager
* @author hengsin
- *
*/
public interface IEventManager {
diff --git a/org.adempiere.base/src/org/adempiere/base/event/IEventTopics.java b/org.adempiere.base/src/org/adempiere/base/event/IEventTopics.java
index 1e8ae325fd..7d2d014a4e 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/IEventTopics.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/IEventTopics.java
@@ -14,9 +14,8 @@
package org.adempiere.base.event;
/**
- *
+ * Event topic constants
* @author hengsin
- *
*/
public interface IEventTopics {
@@ -91,7 +90,7 @@ public interface IEventTopics {
public static final String PREF_AFTER_LOAD = "adempiere/pref/afterLoad";
- /** Called after next document actions are set */
+ /** Called during discovery of available and valid document actions */
public static final String DOCACTION = "adempiere/docAction";
public static final String BROADCAST_MESSAGE = "idempiere/broadcastMsg";
diff --git a/org.adempiere.base/src/org/adempiere/base/event/ImportEventData.java b/org.adempiere.base/src/org/adempiere/base/event/ImportEventData.java
index 5bd3818c2a..4a95e252ba 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/ImportEventData.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/ImportEventData.java
@@ -13,13 +13,13 @@
*****************************************************************************/
package org.adempiere.base.event;
+import org.adempiere.base.event.annotations.imp.ImportEventDelegate;
import org.adempiere.process.ImportProcess;
import org.compiere.model.PO;
/**
- *
+ * Event data for {@link ImportEventDelegate}.
* @author hengsin
- *
*/
public class ImportEventData {
private ImportProcess importProcess;
@@ -46,14 +46,14 @@ public class ImportEventData {
}
/**
- * @return the source
+ * @return the source PO
*/
public PO getSource() {
return source;
}
/**
- * @return the target
+ * @return the target PO
*/
public PO getTarget() {
return target;
diff --git a/org.adempiere.base/src/org/adempiere/base/event/LoginEventData.java b/org.adempiere.base/src/org/adempiere/base/event/LoginEventData.java
index 408e80eeed..9bb41e268a 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/LoginEventData.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/LoginEventData.java
@@ -13,10 +13,11 @@
*****************************************************************************/
package org.adempiere.base.event;
+import org.adempiere.base.event.annotations.AfterLoginEventDelegate;
+
/**
- *
+ * Event data for {@link AfterLoginEventDelegate}.
* @author hengsin
- *
*/
public class LoginEventData {
private int AD_Client_ID;
diff --git a/org.adempiere.base/src/org/adempiere/base/event/ReportSendEMailEventData.java b/org.adempiere.base/src/org/adempiere/base/event/ReportSendEMailEventData.java
index ffaf5f50b2..40e2790321 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/ReportSendEMailEventData.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/ReportSendEMailEventData.java
@@ -33,6 +33,9 @@ package org.adempiere.base.event;
import org.compiere.model.PrintInfo;
+/**
+ * Event data for {@link IEventTopics#REPORT_SEND_EMAIL} event topic.
+ */
public class ReportSendEMailEventData {
public static final String CONTEXT_EMAIL_TO = "_EMAIL_TO_";
@@ -49,10 +52,25 @@ public class ReportSendEMailEventData {
private int m_recordId;
private String m_recordUU;
+ /**
+ * @param windowNo
+ * @param tableId
+ * @param recordId
+ * @param printInfo
+ * @param subject
+ */
public ReportSendEMailEventData(int windowNo, int tableId, int recordId, PrintInfo printInfo, String subject) {
this(windowNo, tableId, recordId, null, printInfo, subject);
}
+ /**
+ * @param windowNo
+ * @param tableId
+ * @param recordId
+ * @param recordUU
+ * @param printInfo
+ * @param subject
+ */
public ReportSendEMailEventData(int windowNo, int tableId, int recordId, String recordUU, PrintInfo printInfo, String subject) {
m_windowNo = windowNo;
m_tableId = tableId;
@@ -62,50 +80,86 @@ public class ReportSendEMailEventData {
m_subject = subject;
}
+ /**
+ * @return window number
+ */
public int getWindowNo() {
return m_windowNo;
}
+ /**
+ * @param windowNo
+ */
public void setWindowNo(int windowNo) {
m_windowNo = windowNo;
}
+ /**
+ * @return AD_Table_ID
+ */
public int getTableId() {
return m_tableId;
}
+ /**
+ * @param tableId AD_Table_ID
+ */
public void setTableId(int tableId) {
m_tableId = tableId;
}
+ /**
+ * @return record id
+ */
public int getRecordId() {
return m_recordId;
}
+ /**
+ * @param recordId
+ */
public void setRecordId(int recordId) {
m_recordId = recordId;
}
+ /**
+ * @return record uuid
+ */
public String getRecordUU() {
return m_recordUU;
}
+ /**
+ * @param recordUU record uuid
+ */
public void setRecordUU(String recordUU) {
m_recordUU = recordUU;
}
+ /**
+ * @return PrintInfo
+ */
public PrintInfo getFrom() {
return m_printInfo;
}
+ /**
+ * @param printInfo
+ */
public void setFrom(PrintInfo printInfo) {
m_printInfo = printInfo;
}
+ /**
+ * @return subject
+ */
public String getSubject() {
return m_subject;
}
+ /**
+ * @param subject
+ */
public void setSubject(String subject) {
m_subject = subject;
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/RequestEventHandler.java b/org.adempiere.base/src/org/adempiere/base/event/RequestEventHandler.java
index 6f5841175c..3d634494fa 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/RequestEventHandler.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/RequestEventHandler.java
@@ -46,7 +46,7 @@ import org.osgi.service.cm.ManagedService;
import org.osgi.service.event.Event;
/**
- * Request event handler
+ * Event handler for R_Request table and REQUEST_SEND_EMAIL event topic.
* @author Nur Yasmin
*
*/
@@ -100,6 +100,12 @@ public class RequestEventHandler extends AbstractEventHandler implements Managed
registerTableEvent(IEventTopics.PO_AFTER_CHANGE, I_R_Request.Table_Name);
}
+ /**
+ * Handle before update of R_Request record
+ * @param r
+ * @param newRecord
+ * @return error message or null
+ */
private String beforeSaveRequest(MRequest r, boolean newRecord)
{
// New
@@ -212,6 +218,12 @@ public class RequestEventHandler extends AbstractEventHandler implements Managed
return null;
}
+ /**
+ * Handle after save of R_Request record
+ * @param r
+ * @param newRecord
+ * @return error message or null
+ */
private String afterSaveRequest(MRequest r, boolean newRecord)
{
// Initial Mail
@@ -222,10 +234,10 @@ public class RequestEventHandler extends AbstractEventHandler implements Managed
}
/**
- * Check for changes
+ * Process changes
* @param ra request action
* @param columnName column
- * @return true if changes
+ * @return true if columnName has changes
*/
public boolean checkChange (MRequest r, MRequestAction ra, String columnName)
{
@@ -395,10 +407,10 @@ public class RequestEventHandler extends AbstractEventHandler implements Managed
}
} // sendNotice
- /**************************************************************************
- * Get MailID
+ /**
+ * Get mail trailer text
* @param serverAddress server address
- * @return Mail Trailer
+ * @return Mail trailer text
*/
private String getMailTrailer(MRequest r, String serverAddress)
{
diff --git a/org.adempiere.base/src/org/adempiere/base/event/RequestPropertyService.java b/org.adempiere.base/src/org/adempiere/base/event/RequestPropertyService.java
index 77a83920d0..6a0cab5995 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/RequestPropertyService.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/RequestPropertyService.java
@@ -32,9 +32,9 @@ import org.osgi.service.cm.Configuration;
import org.osgi.service.cm.ConfigurationAdmin;
/**
- * Request property service
+ * Load request property from requesteventhandler.properties and update {@link Configuration}
+ * through {@link ConfigurationAdmin} service.
* @author Elaine
- *
*/
public class RequestPropertyService {
@@ -42,17 +42,30 @@ public class RequestPropertyService {
private static final CLogger logger = CLogger.getCLogger(RequestPropertyService.class);
+ /**
+ * Default constructor
+ */
public RequestPropertyService() {
}
+ /**
+ * @param configurationAdmin
+ */
public void bindConfigurationAdmin(ConfigurationAdmin configurationAdmin) {
readProperties(configurationAdmin);
}
+ /**
+ * @param configurationAdmin
+ */
public void unbindConfigurationAdmin(ConfigurationAdmin configurationAdmin) {
}
+ /**
+ * Load request property from requesteventhandler.properties
+ * @param service
+ */
private void readProperties(ConfigurationAdmin service) {
File file = new File(Ini.getAdempiereHome(), REQUESTEVENTHANDLER_PROPERTIES);
if (file.exists()) {
diff --git a/org.adempiere.base/src/org/adempiere/base/event/RequestSendEMailEventData.java b/org.adempiere.base/src/org/adempiere/base/event/RequestSendEMailEventData.java
index e3e8f0806a..0c889a8e8d 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/RequestSendEMailEventData.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/RequestSendEMailEventData.java
@@ -20,9 +20,8 @@ import org.compiere.model.MClient;
import org.compiere.model.MUser;
/**
- *
+ * Event data for {@link IEventTopics#REQUEST_SEND_EMAIL} event topic.
* @author Elaine
- *
*/
public class RequestSendEMailEventData
{
@@ -35,10 +34,29 @@ public class RequestSendEMailEventData
private int requestID;
private boolean isHtml;
+ /**
+ * @param client
+ * @param from
+ * @param to
+ * @param subject
+ * @param message
+ * @param attachment
+ * @param requestID
+ */
public RequestSendEMailEventData(MClient client, MUser from, MUser to, String subject, String message, File attachment, int requestID) {
this(client, from, to, subject, message, attachment, requestID, false);
}
+ /**
+ * @param client
+ * @param from
+ * @param to
+ * @param subject
+ * @param message
+ * @param attachment
+ * @param requestID
+ * @param isHtml
+ */
public RequestSendEMailEventData(MClient client, MUser from, MUser to, String subject, String message, File attachment, int requestID, boolean isHtml) {
setClient(client);
setFrom(from);
@@ -50,66 +68,114 @@ public class RequestSendEMailEventData
setHtml(isHtml);
}
+ /**
+ * @return MClient
+ */
public MClient getClient() {
return client;
}
+ /**
+ * @param client
+ */
public void setClient(MClient client) {
this.client = client;
}
+ /**
+ * @return from user
+ */
public MUser getFrom() {
return from;
}
+ /**
+ * @param from from user
+ */
public void setFrom(MUser from) {
this.from = from;
}
+ /**
+ * @return to user
+ */
public MUser getTo() {
return to;
}
+ /**
+ * @param to to user
+ */
public void setTo(MUser to) {
this.to = to;
}
+ /**
+ * @return subject
+ */
public String getSubject() {
return subject;
}
+ /**
+ * @param subject
+ */
public void setSubject(String subject) {
this.subject = subject;
}
+ /**
+ * @return message
+ */
public String getMessage() {
return message;
}
+ /**
+ * @param message
+ */
public void setMessage(String message) {
this.message = message;
}
+ /**
+ * @return attachment file
+ */
public File getAttachment() {
return attachment;
}
+ /**
+ * @param attachment
+ */
public void setAttachment(File attachment) {
this.attachment = attachment;
}
+ /**
+ * @return R_Request_ID
+ */
public int getRequestID() {
return requestID;
}
+ /**
+ * @param requestID R_Request_ID
+ */
public void setRequestID(int requestID) {
this.requestID = requestID;
}
+ /**
+ * @return true if message is html text
+ */
public boolean isHtml() {
return isHtml;
}
+ /**
+ * @param isHtml
+ */
public void setHtml(boolean isHtml) {
this.isHtml = isHtml;
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/AfterLoginEventDelegate.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/AfterLoginEventDelegate.java
index ad1ed275f4..72727a504d 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/AfterLoginEventDelegate.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/AfterLoginEventDelegate.java
@@ -29,9 +29,10 @@ import org.adempiere.base.event.LoginEventData;
import org.osgi.service.event.Event;
/**
- *
+ * Event delegate for login event.
+ * To handle login event, create a subclass of this and uses the {@link AfterLogin} annotation to
+ * annotate the method for the login event topic.
* @author hengsin
- *
*/
public abstract class AfterLoginEventDelegate extends EventDelegate {
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/BaseEventHandler.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/BaseEventHandler.java
index 64e4762fba..ad43f56c4d 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/BaseEventHandler.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/BaseEventHandler.java
@@ -29,26 +29,26 @@ import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
+import org.adempiere.base.annotation.EventTopicDelegate;
import org.adempiere.base.event.EventHelper;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventHandler;
/**
*
- * Base class for event handler that works with annotation driven event delegate.
+ * Base class for event handler that works with annotation driven event delegate ({@link EventTopicDelegate}).
* The implementation of event delegate doesn't have to be thread safe as a new instance of delegate is created for each event call.
* @author hengsin
*
*/
public abstract class BaseEventHandler implements EventHandler {
- //event topic to method mapping
+ /** event topic:method */
protected final Map eventTopicMap = new HashMap();
private String filter;
private Class extends EventDelegate> delegateClass;
/**
- *
* @param delegateClass
*/
public BaseEventHandler(Class extends EventDelegate> delegateClass) {
@@ -58,7 +58,7 @@ public abstract class BaseEventHandler implements EventHandler {
}
/**
- * create event to topic to method mapping from annotations
+ * create event topic to method mapping from annotations
* @param delegateClass
*/
protected void createTopicMap(Class> delegateClass) {
@@ -80,7 +80,6 @@ public abstract class BaseEventHandler implements EventHandler {
}
/**
- *
* @return arrays of event topic
*/
public String[] getTopics() {
@@ -91,7 +90,6 @@ public abstract class BaseEventHandler implements EventHandler {
}
/**
- *
* @return event filter
*/
public String getFilter() {
@@ -107,7 +105,6 @@ public abstract class BaseEventHandler implements EventHandler {
}
/**
- *
* @param propertyName
* @param value
*/
@@ -153,7 +150,7 @@ public abstract class BaseEventHandler implements EventHandler {
/**
* create new instance of event delegate
* @param event
- * @return {@link EventDelegate}
+ * @return new {@link EventDelegate} instance
*/
protected abstract EventDelegate newEventDelegate(Event event);
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/EventDelegate.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/EventDelegate.java
index 3151bbb21a..2abaccfcad 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/EventDelegate.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/EventDelegate.java
@@ -28,8 +28,8 @@ import org.osgi.service.event.Event;
/**
*
- * Annotation driven event delegate base class that works together with {@link BaseEventHandler}.
- * Subclass implementation doesn't have to be thread safe as event delegate is create and throw away for each event call.
+ * Annotation driven event delegate base class that works together with {@link BaseEventHandler}.
+ * Subclass implementation doesn't have to be thread safe as event delegate is create and throw away for each event call.
* Subclass should use {@link EventTopic} or one of its derived annotation to define the event topic to handle
* @author hengsin
*
@@ -39,7 +39,6 @@ public class EventDelegate {
protected Event event;
/**
- *
* @param event
*/
public EventDelegate(Event event) {
@@ -47,7 +46,6 @@ public class EventDelegate {
}
/**
- *
* @return {@link Event}
*/
protected Event getEvent() {
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/ModelEventDelegate.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/ModelEventDelegate.java
index 0104e796b6..a7c4608b4b 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/ModelEventDelegate.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/ModelEventDelegate.java
@@ -28,8 +28,9 @@ import org.compiere.model.PO;
import org.osgi.service.event.Event;
/**
- *
- * event delegate for PO related event (po_before_change, doc_before_complete, etc)
+ * Event delegate for PO related event.
+ * To handle a model event, create a subclass of this and uses the model event annotation (BeforeChange, BeforeComplete, etc)
+ * to annotate the method for a specific model event topic.
* @author hengsin
*
* @param
@@ -39,7 +40,6 @@ public class ModelEventDelegate extends EventDelegate {
private T model;
/**
- *
* @param po
* @param event
*/
@@ -49,8 +49,7 @@ public class ModelEventDelegate extends EventDelegate {
}
/**
- *
- * @return po model (mbpartner, morder, etc)
+ * @return PO model (MBPartner, MOrder, etc)
*/
protected T getModel() {
return model;
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/ModelEventHandler.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/ModelEventHandler.java
index 02855f3946..69331e78e5 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/ModelEventHandler.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/ModelEventHandler.java
@@ -34,11 +34,10 @@ import org.compiere.model.PO;
import org.osgi.service.event.Event;
/**
- *
- * Event handler for PO related events (po_before_change, doc_before_complete, etc).
- * Delegate to {@link ModelEventDelegate} instance created for each event call
+ * Event handler for PO related events.
+ * Developers usually don't have to use this class directly; instead, the recommended approach is
+ * to subclass {@link ModelEventDelegate} and use model event topic annotations.
* @author hengsin
- *
*/
public final class ModelEventHandler extends BaseEventHandler {
@@ -48,6 +47,8 @@ public final class ModelEventHandler extends BaseEventHandler {
/**
* @param modelClassType
+ * @param delegateClass
+ * @param supplier
*/
public ModelEventHandler(Class modelClassType, Class extends ModelEventDelegate> delegateClass,
BiFunction> supplier) {
@@ -57,6 +58,9 @@ public final class ModelEventHandler extends BaseEventHandler {
findTableName();
}
+ /**
+ * Find table name property from annotation or static field (Table_Name).
+ */
private void findTableName() {
try {
Model model = modelClassType.getSuperclass().getAnnotation(Model.class);
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/RequestSendEmailEventDelegate.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/RequestSendEmailEventDelegate.java
index 9a888dfeeb..d8cc9a202d 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/RequestSendEmailEventDelegate.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/RequestSendEmailEventDelegate.java
@@ -29,7 +29,8 @@ import org.adempiere.base.event.RequestSendEMailEventData;
import org.osgi.service.event.Event;
/**
- *
+ * Event delegate for {@link RequestSendEMail} event topic.
+ * To handle RequestSendEMail event, create a sub class of this and override the onRequestSendEmail method.
* @author hengsin
*
*/
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/SimpleEventHandler.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/SimpleEventHandler.java
index bfb40297f1..b4a70e65d0 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/SimpleEventHandler.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/SimpleEventHandler.java
@@ -29,8 +29,7 @@ import java.util.function.Function;
import org.osgi.service.event.Event;
/**
- *
- * Event handler that delegate to {@link EventDelegate} instance (create for each event call)
+ * Event handler that delegate to {@link EventDelegate} instance (create for each event call).
* @author hengsin
*
*/
@@ -39,7 +38,6 @@ public final class SimpleEventHandler extends BaseEventHandler {
private Function supplier;
/**
- *
* @param delegateClass
* @param supplier
*/
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/FactsValidateDelegate.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/FactsValidateDelegate.java
index 40f129f6f7..569dac6e61 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/FactsValidateDelegate.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/FactsValidateDelegate.java
@@ -31,14 +31,14 @@ import org.compiere.model.PO;
import org.osgi.service.event.Event;
/**
- *
+ * Event delegate for facts validate event.
+ * To handle facts validate event, create a subclass of this and uses the {@link FactsValidate} annotation
+ * to annotate the method for the FactsValidate event topic.
* @author hengsin
- *
*/
public abstract class FactsValidateDelegate extends ModelEventDelegate {
/**
- *
* @param po
* @param event
*/
@@ -47,7 +47,6 @@ public abstract class FactsValidateDelegate extends ModelEventDele
}
/**
- *
* @return {@link FactsEventData}
*/
protected FactsEventData getFactsEventData() {
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/ImportEventDelegate.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/ImportEventDelegate.java
index ba432e090d..8aa26a9ba5 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/ImportEventDelegate.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/ImportEventDelegate.java
@@ -30,9 +30,10 @@ import org.adempiere.base.event.annotations.EventDelegate;
import org.osgi.service.event.Event;
/**
- *
+ * Event delegate for import event.
+ * To handle an import event, create a sub class of this and uses the import event annotation (AfterImport, BeforeImport, etc)
+ * to annotate method for a specific import event topic.
* @author hengsin
- *
*/
public class ImportEventDelegate extends EventDelegate {
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/ImportEventHandler.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/ImportEventHandler.java
index 1ff6b8460c..70284b6217 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/ImportEventHandler.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/ImportEventHandler.java
@@ -33,9 +33,10 @@ import org.compiere.util.Util;
import org.osgi.service.event.Event;
/**
- *
+ * Event handler for import event.
+ * Developers usually don't have to use this class directly; instead, the recommended approach is
+ * to subclass {@link ImportEventDelegate} and use import event topic annotation.
* @author hengsin
- *
*/
public class ImportEventHandler extends BaseEventHandler {
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/process/ProcessEventDelegate.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/process/ProcessEventDelegate.java
index 08cc8c7297..78a859c2dd 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/process/ProcessEventDelegate.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/process/ProcessEventDelegate.java
@@ -30,7 +30,9 @@ import org.compiere.process.ProcessInfo;
import org.osgi.service.event.Event;
/**
- *
+ * Event delegate for handling of process event.
+ * To handle a process related event topic, create a sub class of this and uses the process annotation
+ * (AfterProcess, BeforeProcess or PostProcess) to annotate the method for a specific process event topic.
* @author hengsin
*
*/
@@ -41,7 +43,6 @@ public class ProcessEventDelegate extends EventDelegate {
}
/**
- *
* @return {@link ProcessInfo}
*/
protected ProcessInfo getProcessInfo() {
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/process/ProcessEventHandler.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/process/ProcessEventHandler.java
index 0b19e3bda4..1d86ee596d 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/process/ProcessEventHandler.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/process/ProcessEventHandler.java
@@ -33,16 +33,16 @@ import org.compiere.util.Util;
import org.osgi.service.event.Event;
/**
- *
+ * Event handle for process related event.
+ * Developers usually don't have to use this class directly; instead, the recommended approach is
+ * to subclass {@link ProcessEventDelegate} and use process event topic annotations.
* @author hengsin
- *
*/
public class ProcessEventHandler extends BaseEventHandler {
private Function supplier;
/**
- *
* @param delegateClass
* @param processUUID filter by process uuid (null for all process)
* @param supplier
diff --git a/org.adempiere.base/src/org/adempiere/base/event/delegate/AutoProduceEventDelegate.java b/org.adempiere.base/src/org/adempiere/base/event/delegate/AutoProduceEventDelegate.java
index 181f019919..1307db053c 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/delegate/AutoProduceEventDelegate.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/delegate/AutoProduceEventDelegate.java
@@ -78,6 +78,11 @@ public class AutoProduceEventDelegate extends ModelEventDelegate {
}
}
+ /**
+ * Process shipment and create production document for auto produce products (if insufficient on hand).
+ * @param mInOut
+ * @return error message or null
+ */
private String processShipment(MInOut mInOut) {
// Auto produce if on hand is not sufficient to fulfill order
Map qtyUsedMap = new HashMap();
@@ -118,6 +123,17 @@ public class AutoProduceEventDelegate extends ModelEventDelegate {
return null;
}
+ /**
+ * Create and complete production document
+ * @param mInOut
+ * @param mInOutLine
+ * @param qtyEntered
+ * @param qtyOnHand
+ * @param endProductID
+ * @param productionCount
+ * @param qtyUsedMap
+ * @return error message or null
+ */
private String createProduction(MInOut mInOut, MInOutLine mInOutLine, BigDecimal qtyEntered, BigDecimal qtyOnHand, int endProductID,
int[] productionCount, Map qtyUsedMap) {
String description=Msg.getElement(Env.getCtx(), "M_InOut_ID", true) + " " + mInOut.getDocumentNo();
diff --git a/org.adempiere.base/src/org/adempiere/base/upload/IUploadHandler.java b/org.adempiere.base/src/org/adempiere/base/upload/IUploadHandler.java
index 0079b9f3b8..c2c6d04f1f 100644
--- a/org.adempiere.base/src/org/adempiere/base/upload/IUploadHandler.java
+++ b/org.adempiere.base/src/org/adempiere/base/upload/IUploadHandler.java
@@ -28,22 +28,18 @@ package org.adempiere.base.upload;
import org.compiere.model.MAuthorizationAccount;
/**
- *
* handler interface for upload request
* @author hengsin
- *
*/
public interface IUploadHandler {
/**
- *
* @return label for handler
*/
public String getLabel();
/**
- *
* @param media
- * @param account userExternalAccount
+ * @param account external account to upload to (for e.g, Google drive account)
* @return {@link UploadResponse}
*/
public UploadResponse uploadMedia(UploadMedia media, MAuthorizationAccount account);
diff --git a/org.adempiere.base/src/org/adempiere/base/upload/IUploadService.java b/org.adempiere.base/src/org/adempiere/base/upload/IUploadService.java
index 5a63ac0c61..4202ff6d4d 100644
--- a/org.adempiere.base/src/org/adempiere/base/upload/IUploadService.java
+++ b/org.adempiere.base/src/org/adempiere/base/upload/IUploadService.java
@@ -26,7 +26,6 @@
package org.adempiere.base.upload;
/**
- *
* interface for upload service
* @author hengsin
*
diff --git a/org.adempiere.base/src/org/adempiere/base/upload/UploadMedia.java b/org.adempiere.base/src/org/adempiere/base/upload/UploadMedia.java
index 0e7eb16ba0..65adf331a7 100644
--- a/org.adempiere.base/src/org/adempiere/base/upload/UploadMedia.java
+++ b/org.adempiere.base/src/org/adempiere/base/upload/UploadMedia.java
@@ -28,7 +28,6 @@ package org.adempiere.base.upload;
import java.io.InputStream;
/**
- *
* representation of media
* @author hengsin
*
@@ -41,7 +40,6 @@ public class UploadMedia {
private long contentLength;
/**
- *
* @param name
* @param contentType
* @param inputStream
@@ -56,7 +54,6 @@ public class UploadMedia {
}
/**
- *
* @return content type of media
*/
public String getContentType() {
@@ -64,7 +61,6 @@ public class UploadMedia {
}
/**
- *
* @return name/label of media
*/
public String getName() {
@@ -72,7 +68,6 @@ public class UploadMedia {
}
/**
- *
* @return {@link InputStream} for media content
*/
public InputStream getInputStream() {
@@ -80,7 +75,6 @@ public class UploadMedia {
}
/**
- *
* @return length of media content
*/
public long getContentLength() {
diff --git a/org.adempiere.base/src/org/adempiere/base/upload/UploadResponse.java b/org.adempiere.base/src/org/adempiere/base/upload/UploadResponse.java
index 131aa93f8f..6b54daf78b 100644
--- a/org.adempiere.base/src/org/adempiere/base/upload/UploadResponse.java
+++ b/org.adempiere.base/src/org/adempiere/base/upload/UploadResponse.java
@@ -26,7 +26,6 @@
package org.adempiere.base.upload;
/**
- *
* Response from upload service
* @author hengsin
*
@@ -37,7 +36,6 @@ public class UploadResponse {
private String linkLabel;
/**
- *
* @param link
* @param linkLabel
*/
@@ -48,15 +46,13 @@ public class UploadResponse {
}
/**
- *
- * @return link url to the uploaded file
+ * @return link URL to the uploaded file
*/
public String getLink() {
return link;
}
/**
- *
* @return label for the uploaded file
*/
public String getLinkLabel() {
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/AdempiereException.java b/org.adempiere.base/src/org/adempiere/exceptions/AdempiereException.java
index 031c0112b4..a7bf65ad68 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/AdempiereException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/AdempiereException.java
@@ -20,7 +20,7 @@ import org.compiere.util.Env;
import org.compiere.util.Msg;
/**
- * Any exception that occurs inside the Adempiere core
+ * Runtime exception that occurs inside the Adempiere core
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
*/
public class AdempiereException extends RuntimeException {
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/BPartnerException.java b/org.adempiere.base/src/org/adempiere/exceptions/BPartnerException.java
index c86fa48624..ecb97feadc 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/BPartnerException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/BPartnerException.java
@@ -22,12 +22,16 @@ import org.compiere.model.I_C_BPartner;
public abstract class BPartnerException extends AdempiereException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -4311798678799373821L;
private final int C_BPartner_ID;
- BPartnerException(String ad_message, I_C_BPartner bp)
+ /**
+ * @param ad_message AD_Message.Value
+ * @param bp
+ */
+ protected BPartnerException(String ad_message, I_C_BPartner bp)
{
super("@"+ad_message+"@ - "+(bp == null ? "?" : bp.getValue()+"_"+bp.getName()));
if (bp != null)
@@ -41,7 +45,7 @@ public abstract class BPartnerException extends AdempiereException
}
/**
- * @return the c_BPartner_ID
+ * @return C_BPartner_ID
*/
public int getC_BPartner_ID()
{
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/BPartnerNoAddressException.java b/org.adempiere.base/src/org/adempiere/exceptions/BPartnerNoAddressException.java
index 183f6ff443..20d68b1a49 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/BPartnerNoAddressException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/BPartnerNoAddressException.java
@@ -22,7 +22,7 @@ import org.compiere.model.I_C_BPartner;
public class BPartnerNoAddressException extends BPartnerException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -1892858395845764918L;
public static final String AD_Message = "BPartnerNoAddress";
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/BPartnerNoBillToAddressException.java b/org.adempiere.base/src/org/adempiere/exceptions/BPartnerNoBillToAddressException.java
index 14bdeab0a5..6d6f0b7abe 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/BPartnerNoBillToAddressException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/BPartnerNoBillToAddressException.java
@@ -22,7 +22,7 @@ import org.compiere.model.I_C_BPartner;
public class BPartnerNoBillToAddressException extends BPartnerException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -8423260338845096466L;
public static final String AD_Message = "BPartnerNoBillToAddress";
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/BPartnerNoShipToAddressException.java b/org.adempiere.base/src/org/adempiere/exceptions/BPartnerNoShipToAddressException.java
index a5fe03bbd9..74c9ab7366 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/BPartnerNoShipToAddressException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/BPartnerNoShipToAddressException.java
@@ -22,7 +22,7 @@ import org.compiere.model.I_C_BPartner;
public class BPartnerNoShipToAddressException extends BPartnerException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 4388496060894704270L;
public static final String AD_Message = "BPartnerNoShipToAddress";
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/DBException.java b/org.adempiere.base/src/org/adempiere/exceptions/DBException.java
index 752b46f529..590b0e88d1 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/DBException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/DBException.java
@@ -44,7 +44,7 @@ import org.compiere.util.Util;
public class DBException extends AdempiereException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -1961265420169932726L;
@@ -56,7 +56,7 @@ public class DBException extends AdempiereException
/**
* Create a new DBException based on a SQLException
- * @param e Specicy the Exception cause
+ * @param e Specify the Exception cause
*/
public DBException(Exception e)
{
@@ -139,7 +139,11 @@ public class DBException extends AdempiereException
return (e != null ? e.getSQLState() : null);
}
-
+ /**
+ * @param e
+ * @param errorCode
+ * @return true if e is SQL exception and errorCode is the error code of SQL exception e.
+ */
private static final boolean isErrorCode(Exception e, int errorCode) {
if (e == null) {
return false;
@@ -158,6 +162,11 @@ public class DBException extends AdempiereException
return false;
}
+ /**
+ * @param e
+ * @param SQLState
+ * @return true if e is SQL exception and SQLState is the SQL state of SQL exception e
+ */
private static final boolean isSQLState(Exception e, String SQLState) {
if (e == null) {
return false;
@@ -178,6 +187,7 @@ public class DBException extends AdempiereException
/**
* Check if Unique Constraint Exception (aka ORA-00001)
* @param e exception
+ * @return true if e is unique constraint exception
*/
public static boolean isUniqueContraintError(Exception e) {
if (DB.isPostgreSQL())
@@ -189,6 +199,7 @@ public class DBException extends AdempiereException
/**
* Check if "child record found" exception (aka ORA-02292)
* @param e exception
+ * @return true if e is child record found exception (typically for delete)
*/
public static boolean isChildRecordFoundError(Exception e) {
if (DB.isPostgreSQL())
@@ -199,6 +210,7 @@ public class DBException extends AdempiereException
/**
* Check if "invalid identifier" exception (aka ORA-00904)
* @param e exception
+ * @return true if e is invalid identifier exception
*/
public static boolean isInvalidIdentifierError(Exception e) {
if (DB.isPostgreSQL())
@@ -207,8 +219,10 @@ public class DBException extends AdempiereException
}
/**
- * Check if "invalid username/password" exception (aka ORA-01017)
+ * Check if "invalid username/password" exception (aka ORA-01017).
+ * Only implemented for Oracle.
* @param e exception
+ * @return true if e is invalid user/password exception
*/
public static boolean isInvalidUserPassError(Exception e) {
return isErrorCode(e, 1017);
@@ -217,6 +231,7 @@ public class DBException extends AdempiereException
/**
* Check if "time out" exception (aka ORA-01013)
* @param e
+ * @return true if e is time out exception
*/
public static boolean isTimeout(Exception e) {
SQLException se = null;
@@ -236,6 +251,7 @@ public class DBException extends AdempiereException
/**
* Check if value too large for column exception (aka ORA-12899)
* @param e exception
+ * @return true if e is value too large for column exception
*/
public static boolean isValueTooLarge(Exception e) {
if (DB.isPostgreSQL())
@@ -246,6 +262,7 @@ public class DBException extends AdempiereException
/**
* @param e
+ * @return default AD message for exception or null
*/
public static String getDefaultDBExceptionMessage(Exception e) {
if (isUniqueContraintError(e)) {
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/DocTypeNotFoundException.java b/org.adempiere.base/src/org/adempiere/exceptions/DocTypeNotFoundException.java
index 769635a687..1b5bac79ec 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/DocTypeNotFoundException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/DocTypeNotFoundException.java
@@ -19,13 +19,13 @@ import org.compiere.util.Env;
import org.compiere.util.Util;
/**
- * Throwed when desired document type was not found
+ * Throw when desired document type was not found
* @author Teo Sarca, www.arhipac.ro
*/
public class DocTypeNotFoundException extends AdempiereException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -4218893853798807816L;
/** Doc Base Type */
@@ -41,6 +41,9 @@ public class DocTypeNotFoundException extends AdempiereException
m_docBaseType = docBaseType;
}
+ /**
+ * @return Document Base Type
+ */
public String getDocBaseType()
{
return m_docBaseType;
@@ -58,7 +61,5 @@ public class DocTypeNotFoundException extends AdempiereException
sb.append(" (").append(additionalInfo).append(")");
}
return sb.toString();
- }
-
-
+ }
}
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/FillMandatoryException.java b/org.adempiere.base/src/org/adempiere/exceptions/FillMandatoryException.java
index b87ea6668f..5142d32643 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/FillMandatoryException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/FillMandatoryException.java
@@ -14,21 +14,28 @@
package org.adempiere.exceptions;
/**
- * Throwed when there are some fields that are mandatory but unfilled.
+ * Throw when there are some fields that are mandatory but unfilled.
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
*/
public class FillMandatoryException extends AdempiereException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 9074980284529933724L;
+ /**
+ * @param fields one or more field
+ */
public FillMandatoryException(String...fields)
{
super("@FillMandatory@ "+buildMessage(fields));
}
+ /**
+ * @param fields
+ * @return comma separated fields
+ */
private static final String buildMessage(String...fields)
{
StringBuilder sb = new StringBuilder();
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/InvoiceFullyMatchedException.java b/org.adempiere.base/src/org/adempiere/exceptions/InvoiceFullyMatchedException.java
index b696b68f8d..28740a0b5d 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/InvoiceFullyMatchedException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/InvoiceFullyMatchedException.java
@@ -14,13 +14,13 @@
package org.adempiere.exceptions;
/**
- * Throwed when an invoice is fully matched so no more receipts can be generated.
+ * Throw when an invoice is fully matched so no more receipts can be generated.
* @author Teo Sarca, www.arhipac.ro
*/
public class InvoiceFullyMatchedException extends AdempiereException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -7474922528576404203L;
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/NegativeInventoryDisallowedException.java b/org.adempiere.base/src/org/adempiere/exceptions/NegativeInventoryDisallowedException.java
index da49059d85..4874adde31 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/NegativeInventoryDisallowedException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/NegativeInventoryDisallowedException.java
@@ -25,14 +25,14 @@ import org.compiere.util.Env;
import org.compiere.util.Msg;
/**
- *
+ * Exception for negative on hand quantity
* @author hengsin
*
*/
public class NegativeInventoryDisallowedException extends AdempiereException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 253224414462489886L;
@@ -43,6 +43,15 @@ public class NegativeInventoryDisallowedException extends AdempiereException
private BigDecimal QtyOnHand;
private BigDecimal MovementQty;
+ /**
+ * @param ctx
+ * @param M_Warehouse_ID
+ * @param M_Product_ID
+ * @param M_AttributeSetInstance_ID
+ * @param M_Locator_ID
+ * @param QtyOnHand
+ * @param MovementQty
+ */
public NegativeInventoryDisallowedException(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, int M_Locator_ID,
BigDecimal QtyOnHand, BigDecimal MovementQty)
{
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/NoUOMConversionException.java b/org.adempiere.base/src/org/adempiere/exceptions/NoUOMConversionException.java
index c7d87e5586..dd49bd59e4 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/NoUOMConversionException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/NoUOMConversionException.java
@@ -25,15 +25,26 @@ public class NoUOMConversionException extends AdempiereException
{
public static final String AD_Message = "NoUOMConversion";
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -4868882017576097089L;
+ /**
+ * @param M_Product_ID
+ * @param C_UOM_ID
+ * @param C_UOM_To_ID
+ */
public NoUOMConversionException(int M_Product_ID, int C_UOM_ID, int C_UOM_To_ID)
{
super(buildMessage(M_Product_ID, C_UOM_ID, C_UOM_To_ID));
}
+ /**
+ * @param M_Product_ID
+ * @param C_UOM_ID
+ * @param C_UOM_To_ID
+ * @return error message
+ */
private static String buildMessage(int M_Product_ID, int C_UOM_ID, int C_UOM_To_ID)
{
StringBuilder sb = new StringBuilder("@"+AD_Message+"@ - ");
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/NoVendorForProductException.java b/org.adempiere.base/src/org/adempiere/exceptions/NoVendorForProductException.java
index 2df5f6f87f..ed65cb6757 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/NoVendorForProductException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/NoVendorForProductException.java
@@ -14,14 +14,14 @@
package org.adempiere.exceptions;
/**
- * Throwed when there is no Vendor Info for given Product.
+ * Throw when there is no Vendor Info for a given Product.
* @author Teo Sarca, www.arhipac.ro
*
FR [ 2457781 ] Introduce NoVendorForProductException
*/
public class NoVendorForProductException extends AdempiereException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 3412903630540562323L;
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/PORelationException.java b/org.adempiere.base/src/org/adempiere/exceptions/PORelationException.java
index d07f98cab0..400a1b1dcd 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/PORelationException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/PORelationException.java
@@ -54,10 +54,15 @@ public class PORelationException extends AdempiereException {
public final Object[] msgParams;
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -906400765022362887L;
+ /**
+ * @param msg
+ * @param adMsg
+ * @param msgParams
+ */
private PORelationException(final String msg, final String adMsg,
final Object... msgParams) {
@@ -67,6 +72,10 @@ public class PORelationException extends AdempiereException {
this.msgParams = msgParams;
}
+ /**
+ * Throw wrong number of key column count exception
+ * @param po
+ */
public static void throwWrongKeyColumnCount(final PO po) {
if (logger.isLoggable(Level.FINE)) logger.fine("Invoked with po " + po);
@@ -88,6 +97,13 @@ public class PORelationException extends AdempiereException {
msgParams);
}
+ /**
+ * throw missing AD_Window_ID exception
+ * @param po
+ * @param referenceName
+ * @param tableName
+ * @param isSOTrx
+ */
public static void throwMissingWindowId(final PO po,
final String referenceName, final String tableName,
final boolean isSOTrx) {
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/PeriodClosedException.java b/org.adempiere.base/src/org/adempiere/exceptions/PeriodClosedException.java
index 2fb0a2b24e..6c0660dcb4 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/PeriodClosedException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/PeriodClosedException.java
@@ -20,8 +20,8 @@ import org.compiere.model.X_C_DocType;
import org.compiere.util.Env;
/**
- * Period Closed Exception.
- * This exception is throwed by
+ * Period Closed Exception.
+ * This exception is throw by
* {@link org.compiere.model.MPeriod#testPeriodOpen(java.util.Properties, Timestamp, int, int)} and
* {@link org.compiere.model.MPeriod#testPeriodOpen(java.util.Properties, Timestamp, String, int)} methods.
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
@@ -33,12 +33,13 @@ import org.compiere.util.Env;
public class PeriodClosedException extends AdempiereException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -2798371272365454799L;
/**
- *
+ * @param dateAcct
+ * @param docBaseType
*/
public PeriodClosedException(Timestamp dateAcct, String docBaseType)
{
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/ProductNotOnPriceListException.java b/org.adempiere.base/src/org/adempiere/exceptions/ProductNotOnPriceListException.java
index 3a522696ce..982a9b6ba1 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/ProductNotOnPriceListException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/ProductNotOnPriceListException.java
@@ -30,17 +30,26 @@ import org.compiere.util.Env;
public class ProductNotOnPriceListException extends AdempiereException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -3505579126676698444L;
public static final String AD_Message = "ProductNotOnPriceList";
+ /**
+ * @param productPricing
+ * @param documentLineNo
+ */
public ProductNotOnPriceListException(IProductPricing productPricing, int documentLineNo)
{
super(buildMessage(productPricing, documentLineNo));
}
+ /**
+ * @param pp
+ * @param documentLineNo
+ * @return error message
+ */
private static final String buildMessage (IProductPricing pp, int documentLineNo)
{
StringBuilder sb = new StringBuilder();
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/TaxCriteriaNotFoundException.java b/org.adempiere.base/src/org/adempiere/exceptions/TaxCriteriaNotFoundException.java
index 0d1d5e8a68..aef41e77e6 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/TaxCriteriaNotFoundException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/TaxCriteriaNotFoundException.java
@@ -22,17 +22,26 @@ package org.adempiere.exceptions;
public class TaxCriteriaNotFoundException extends AdempiereException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -8192276006656371964L;
private static final String AD_Message = "TaxCriteriaNotFound";
+ /**
+ * @param criteriaName
+ * @param criteria_ID
+ */
public TaxCriteriaNotFoundException(String criteriaName, int criteria_ID)
{
super(buildMessage(criteriaName, criteria_ID));
}
+ /**
+ * @param criteriaName
+ * @param criteria_ID
+ * @return error message
+ */
private static final String buildMessage (String criteriaName, int criteria_ID)
{
StringBuilder msg = new StringBuilder("@").append(AD_Message).append("@");
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/TaxForChangeNotFoundException.java b/org.adempiere.base/src/org/adempiere/exceptions/TaxForChangeNotFoundException.java
index b3138372a6..9a444685a3 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/TaxForChangeNotFoundException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/TaxForChangeNotFoundException.java
@@ -16,19 +16,27 @@ package org.adempiere.exceptions;
import org.compiere.util.Util;
/**
- * Throw when tax not found for given charge
+ * Throw when tax not found for a given charge
* @author Teo Sarca, www.arhipac.ro
*
FR [ 2758097 ] Implement TaxNotFoundException
*/
public class TaxForChangeNotFoundException extends AdempiereException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 6553174922970467775L;
private static final String AD_Message = "TaxForChargeNotFound"; // TODO : translate
+ /**
+ * @param C_Charge_ID
+ * @param AD_Org_ID
+ * @param M_Warehouse_ID
+ * @param billC_BPartner_Location_ID
+ * @param shipC_BPartner_Location_ID
+ * @param additionalMsg
+ */
public TaxForChangeNotFoundException(int C_Charge_ID, int AD_Org_ID, int M_Warehouse_ID,
int billC_BPartner_Location_ID, int shipC_BPartner_Location_ID, String additionalMsg)
{
@@ -37,6 +45,15 @@ public class TaxForChangeNotFoundException extends AdempiereException
additionalMsg));
}
+ /**
+ * @param C_Charge_ID
+ * @param AD_Org_ID
+ * @param M_Warehouse_ID
+ * @param billC_BPartner_Location_ID
+ * @param shipC_BPartner_Location_ID
+ * @param additionalMsg
+ * @return error message
+ */
private static final String buildMessage(int C_Charge_ID, int AD_Org_ID, int M_Warehouse_ID,
int billC_BPartner_Location_ID, int shipC_BPartner_Location_ID, String additionalMsg)
{
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/TaxNoExemptFoundException.java b/org.adempiere.base/src/org/adempiere/exceptions/TaxNoExemptFoundException.java
index b60a207633..47c74cfb23 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/TaxNoExemptFoundException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/TaxNoExemptFoundException.java
@@ -30,11 +30,18 @@ public class TaxNoExemptFoundException extends AdempiereException
private static final String AD_Message = "TaxNoExemptFound";
+ /**
+ * @param AD_Org_ID
+ */
public TaxNoExemptFoundException(int AD_Org_ID)
{
super(buildMessage(AD_Org_ID));
}
+ /**
+ * @param AD_Org_ID
+ * @return error message
+ */
private static final String buildMessage (int AD_Org_ID)
{
StringBuilder msg = new StringBuilder("@").append(AD_Message).append("@");
@@ -43,6 +50,10 @@ public class TaxNoExemptFoundException extends AdempiereException
return msg.toString();
}
+ /**
+ * @param AD_Org_ID
+ * @return name for AD_Org_ID (* for 0 and ? for not found AD_Org_ID)
+ */
private static final String getOrgString(int AD_Org_ID)
{
if (AD_Org_ID <= 0)
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/TaxNotFoundException.java b/org.adempiere.base/src/org/adempiere/exceptions/TaxNotFoundException.java
index 8e9f888c35..f0bdd4125d 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/TaxNotFoundException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/TaxNotFoundException.java
@@ -29,13 +29,23 @@ import org.compiere.util.Env;
public class TaxNotFoundException extends AdempiereException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -5471615720092096644L;
/** AD_Message code */
private static final String AD_Message = "TaxNotFound";
+ /**
+ * @param C_TaxCategory_ID
+ * @param IsSOTrx
+ * @param shipDate
+ * @param shipFromC_Location_ID
+ * @param shipToC_Location_ID
+ * @param billDate
+ * @param billFromC_Location_ID
+ * @param billToC_Location_ID
+ */
public TaxNotFoundException(int C_TaxCategory_ID, boolean IsSOTrx,
Timestamp shipDate, int shipFromC_Location_ID, int shipToC_Location_ID,
Timestamp billDate, int billFromC_Location_ID, int billToC_Location_ID)
@@ -45,6 +55,17 @@ public class TaxNotFoundException extends AdempiereException
billDate, billFromC_Location_ID, billToC_Location_ID));
}
+ /**
+ * @param C_TaxCategory_ID
+ * @param IsSOTrx
+ * @param shipDate
+ * @param shipFromC_Location_ID
+ * @param shipToC_Location_ID
+ * @param billDate
+ * @param billFromC_Location_ID
+ * @param billToC_Location_ID
+ * @return error message
+ */
private static final String buildMessage (int C_TaxCategory_ID, boolean IsSOTrx,
Timestamp shipDate, int shipFromC_Location_ID, int shipToC_Location_ID,
Timestamp billDate, int billFromC_Location_ID, int billToC_Location_ID)
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/WarehouseInvalidForOrgException.java b/org.adempiere.base/src/org/adempiere/exceptions/WarehouseInvalidForOrgException.java
index c1a44a1e68..fed9d5bb69 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/WarehouseInvalidForOrgException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/WarehouseInvalidForOrgException.java
@@ -24,9 +24,8 @@ package org.adempiere.exceptions;
*/
public class WarehouseInvalidForOrgException extends AdempiereException
{
-
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -8637554073291880392L;
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/WarehouseLocatorConflictException.java b/org.adempiere.base/src/org/adempiere/exceptions/WarehouseLocatorConflictException.java
index 4d092a9c39..00bd009cbb 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/WarehouseLocatorConflictException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/WarehouseLocatorConflictException.java
@@ -17,13 +17,13 @@ import org.compiere.model.I_M_Locator;
import org.compiere.model.I_M_Warehouse;
/**
- * Throwed when a document warehouse does not match with document or document line locator.
+ * Throw when a document's warehouse does not match with document or document line locator.
* @author Teo Sarca, www.arhipac.ro
*/
public class WarehouseLocatorConflictException extends AdempiereException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 4812283712626432829L;
diff --git a/org.adempiere.base/src/org/adempiere/impexp/AbstractExcelExporter.java b/org.adempiere.base/src/org/adempiere/impexp/AbstractExcelExporter.java
index 0c553f0538..da71e6ce5c 100644
--- a/org.adempiere.base/src/org/adempiere/impexp/AbstractExcelExporter.java
+++ b/org.adempiere.base/src/org/adempiere/impexp/AbstractExcelExporter.java
@@ -147,6 +147,9 @@ public abstract class AbstractExcelExporter
protected Boolean[] colSuppressRepeats;
private int noOfParameter = 0;
+ /**
+ * Default constructor
+ */
public AbstractExcelExporter() {
m_workbook = new HSSFWorkbook();
m_dataFormat = m_workbook.createDataFormat();
@@ -156,23 +159,39 @@ public abstract class AbstractExcelExporter
return Env.getCtx();
}
+ /**
+ * @param colSplit column index to freeze
+ * @param rowSplit row index to freeze
+ */
protected void setFreezePane(int colSplit, int rowSplit) {
m_colSplit = colSplit;
m_rowSplit = rowSplit;
}
+ /**
+ * Remove diacritics from str
+ * @param str
+ * @return fix string for Excel
+ */
private String fixString(String str)
{
// ms excel doesn't support UTF8 charset
return Util.stripDiacritics(str);
}
+ /**
+ * @return Language
+ */
protected Language getLanguage() {
if (m_lang == null)
m_lang = Env.getLanguage(getCtx());
return m_lang;
}
+ /**
+ * @param isHeader
+ * @return HSSFFont
+ */
private HSSFFont getFont(boolean isHeader) {
HSSFFont font = null;
if (isHeader) {
@@ -200,7 +219,7 @@ public abstract class AbstractExcelExporter
* Get Excel number format string by given {@link NumberFormat}
* @param df number format
* @param isHighlightNegativeNumbers highlight negative numbers using RED color
- * @return number excel format string
+ * @return excel format pattern
*/
private String getFormatString(NumberFormat df, boolean isHighlightNegativeNumbers) {
StringBuilder format = new StringBuilder();
@@ -235,6 +254,11 @@ public abstract class AbstractExcelExporter
}
+ /**
+ * @param row
+ * @param col
+ * @return HSSFCellStyle
+ */
private HSSFCellStyle getStyle(int row, int col) {
int displayType = getDisplayType(row, col);
String key = "cell-"+col+"-"+displayType;
@@ -257,6 +281,11 @@ public abstract class AbstractExcelExporter
return cs;
}
+ /**
+ * @param row
+ * @param col
+ * @return Excel format pattern for cell
+ */
protected String getCellFormat(int row, int col) {
boolean isHighlightNegativeNumbers = true;
int displayType = getDisplayType(row, col);
@@ -272,6 +301,10 @@ public abstract class AbstractExcelExporter
return cellFormat;
}
+ /**
+ * @param col
+ * @return HSSFCellStyle for column
+ */
private HSSFCellStyle getHeaderStyle(int col)
{
String key = "header-"+col;
@@ -291,6 +324,11 @@ public abstract class AbstractExcelExporter
return cs_header;
}
+ /**
+ * auto size column
+ * @param sheet
+ * @param lastColumnIndex
+ */
private void fixColumnWidth(HSSFSheet sheet, int lastColumnIndex)
{
for (short colnum = 0; colnum < lastColumnIndex; colnum++)
@@ -299,6 +337,12 @@ public abstract class AbstractExcelExporter
}
}
+ /**
+ * Update sheet setting prior to closing it
+ * @param prevSheet
+ * @param prevSheetName
+ * @param colCount
+ */
private void closeTableSheet(HSSFSheet prevSheet, String prevSheetName, int colCount)
{
if (prevSheet == null)
@@ -317,6 +361,11 @@ public abstract class AbstractExcelExporter
}
}
}
+
+ /**
+ * Create new sheet
+ * @return HSSFSheet
+ */
private HSSFSheet createTableSheet()
{
HSSFSheet sheet= m_workbook.createSheet();
@@ -332,11 +381,18 @@ public abstract class AbstractExcelExporter
return sheet;
}
+ /**
+ * @param sheet
+ */
private void createTableHeader(HSSFSheet sheet)
{
createTableHeader(sheet, Math.max(noOfParameter, 0));
}
-
+
+ /**
+ * @param sheet
+ * @param headerRowNum
+ */
private void createTableHeader(HSSFSheet sheet, int headerRowNum)
{
int colnumMax = 0;
@@ -362,21 +418,35 @@ public abstract class AbstractExcelExporter
} // for all columns
}
+ /**
+ * @return number of parameter
+ */
protected int getNoOfParameter()
{
return noOfParameter;
}
+ /**
+ * @param noOfParameter
+ */
protected void setNoOfParameter(int noOfParameter)
{
this.noOfParameter = noOfParameter;
}
+ /**
+ * Create parameter
+ * @param sheet
+ */
protected void createParameter(HSSFSheet sheet)
{
}
+ /**
+ * Create sheet header and footer
+ * @param sheet
+ */
protected void createHeaderFooter(HSSFSheet sheet)
{
// Sheet Header
@@ -401,6 +471,10 @@ public abstract class AbstractExcelExporter
}
+ /**
+ * Format sheet
+ * @param sheet
+ */
protected void formatPage(HSSFSheet sheet)
{
sheet.setFitToPage(true);
@@ -412,11 +486,17 @@ public abstract class AbstractExcelExporter
ps.setLandscape(false);
}
+ /**
+ * @return true if export current record only
+ */
protected boolean isCurrentRowOnly()
{
return currentRowOnly;
}
+ /**
+ * @param b
+ */
protected void setCurrentRowOnly(boolean b)
{
currentRowOnly = b;
@@ -618,6 +698,12 @@ public abstract class AbstractExcelExporter
Env.startBrowser(file.toURI().toString());
}
+ /**
+ * Export to work book
+ * @param workbook
+ * @param language
+ * @throws Exception
+ */
public void exportToWorkbook(HSSFWorkbook workbook, Language language)
throws Exception
{
@@ -635,10 +721,9 @@ public abstract class AbstractExcelExporter
}
/**
- *
* @param row
* @param col
- * @return true if column is visible
+ * @return true if cell is visible
*/
protected boolean isVisible(int row, int col)
{
@@ -646,7 +731,6 @@ public abstract class AbstractExcelExporter
}
/**
- *
* @param col
* @return true if column should be hidden when it is null
*/
@@ -655,7 +739,6 @@ public abstract class AbstractExcelExporter
}
/**
- *
* @param col
* @return true if column is use to set new row position
*/
diff --git a/org.adempiere.base/src/org/adempiere/impexp/AbstractXLSXExporter.java b/org.adempiere.base/src/org/adempiere/impexp/AbstractXLSXExporter.java
index b1fbece037..e1f8eed482 100644
--- a/org.adempiere.base/src/org/adempiere/impexp/AbstractXLSXExporter.java
+++ b/org.adempiere.base/src/org/adempiere/impexp/AbstractXLSXExporter.java
@@ -156,6 +156,9 @@ public abstract class AbstractXLSXExporter
protected Boolean[] colSuppressRepeats;
private int noOfParameter = 0;
+ /**
+ * Default constructor
+ */
public AbstractXLSXExporter()
{
m_workbook = new XSSFWorkbook();
@@ -167,18 +170,30 @@ public abstract class AbstractXLSXExporter
return Env.getCtx();
}
+ /**
+ * @param colSplit column index to freeze
+ * @param rowSplit row index to freeze
+ */
protected void setFreezePane(int colSplit, int rowSplit)
{
m_colSplit = colSplit;
m_rowSplit = rowSplit;
}
+ /**
+ * Remove diacritics from str
+ * @param str
+ * @return fix string for Excel
+ */
private String fixString(String str)
{
// ms excel doesn't support UTF8 charset
return Util.stripDiacritics(str);
}
+ /**
+ * @return Language
+ */
protected Language getLanguage()
{
if (m_lang == null)
@@ -186,6 +201,10 @@ public abstract class AbstractXLSXExporter
return m_lang;
}
+ /**
+ * @param isHeader
+ * @return XSSFFont
+ */
private XSSFFont getFont(boolean isHeader)
{
XSSFFont font = null;
@@ -221,7 +240,7 @@ public abstract class AbstractXLSXExporter
* @param df number format
* @param isHighlightNegativeNumbers highlight negative numbers using RED
* color
- * @return number excel format string
+ * @return excel format pattern
*/
private String getFormatString(NumberFormat df, boolean isHighlightNegativeNumbers)
{
@@ -262,6 +281,11 @@ public abstract class AbstractXLSXExporter
}
+ /**
+ * @param row
+ * @param col
+ * @return XSSFCellStyle
+ */
private XSSFCellStyle getStyle(int row, int col)
{
int displayType = getDisplayType(row, col);
@@ -286,6 +310,11 @@ public abstract class AbstractXLSXExporter
return cs;
}
+ /**
+ * @param row
+ * @param col
+ * @return Excel format pattern for cell
+ */
protected String getCellFormat(int row, int col) {
boolean isHighlightNegativeNumbers = true;
int displayType = getDisplayType(row, col);
@@ -301,6 +330,10 @@ public abstract class AbstractXLSXExporter
return cellFormat;
}
+ /**
+ * @param col
+ * @return XSSFCellStyle for column
+ */
private XSSFCellStyle getHeaderStyle(int col)
{
String key = "header-" + col;
@@ -321,6 +354,11 @@ public abstract class AbstractXLSXExporter
return cs_header;
}
+ /**
+ * auto size column
+ * @param sheet
+ * @param lastColumnIndex
+ */
private void fixColumnWidth(XSSFSheet sheet, int colCount)
{
for (short colnum = 0; colnum < colCount; colnum++)
@@ -329,6 +367,12 @@ public abstract class AbstractXLSXExporter
}
}
+ /**
+ * Update sheet setting prior to closing it
+ * @param prevSheet
+ * @param prevSheetName
+ * @param colCount
+ */
private void closeTableSheet(XSSFSheet prevSheet, String prevSheetName, int colCount)
{
if (prevSheet == null)
@@ -351,6 +395,10 @@ public abstract class AbstractXLSXExporter
}
}
+ /**
+ * Create new sheet
+ * @return XSSFSheet
+ */
private XSSFSheet createTableSheet()
{
XSSFSheet sheet = m_workbook.createSheet();
@@ -366,11 +414,18 @@ public abstract class AbstractXLSXExporter
return sheet;
}
+ /**
+ * @param sheet
+ */
private void createTableHeader(XSSFSheet sheet)
{
createTableHeader(sheet, Math.max(noOfParameter, 0));
}
+ /**
+ * @param sheet
+ * @param headerRowNum
+ */
private void createTableHeader(XSSFSheet sheet, int headerRowNum)
{
int colnumMax = 0;
@@ -419,6 +474,10 @@ public abstract class AbstractXLSXExporter
footer.setRight(DisplayType.getDateFormat(DisplayType.DateTime, getLanguage()).format(now));
}
+ /**
+ * Format sheet
+ * @param sheet
+ */
protected void formatPage(XSSFSheet sheet)
{
sheet.setFitToPage(true);
@@ -430,11 +489,17 @@ public abstract class AbstractXLSXExporter
ps.setLandscape(false);
}
+ /**
+ * @return true if export current record only
+ */
protected boolean isCurrentRowOnly()
{
return currentRowOnly;
}
+ /**
+ * @param b
+ */
protected void setCurrentRowOnly(boolean b)
{
currentRowOnly = b;
@@ -655,6 +720,12 @@ public abstract class AbstractXLSXExporter
Env.startBrowser(file.toURI().toString());
}
+ /**
+ * Export to workbook
+ * @param workbook
+ * @param language
+ * @throws Exception
+ */
public void exportToWorkbook(XSSFWorkbook workbook, Language language) throws Exception
{
m_lang = language;
@@ -670,26 +741,35 @@ public abstract class AbstractXLSXExporter
return false;
}
+ /**
+ * @return number of parameter
+ */
protected int getNoOfParameter()
{
return noOfParameter;
}
+ /**
+ * @param noOfParameter
+ */
protected void setNoOfParameter(int noOfParameter)
{
this.noOfParameter = noOfParameter;
}
+ /**
+ * Create parameter
+ * @param sheet
+ */
protected void createParameter(XSSFSheet sheet)
{
}
/**
- *
* @param row
* @param col
- * @return true if column is visible
+ * @return true if cell is visible
*/
protected boolean isVisible(int row, int col)
{
@@ -697,7 +777,6 @@ public abstract class AbstractXLSXExporter
}
/**
- *
* @param col
* @return true if column should be hidden when it is null
*/
@@ -706,7 +785,6 @@ public abstract class AbstractXLSXExporter
}
/**
- *
* @param col
* @return true if column is use to set new row position
*/
diff --git a/org.adempiere.base/src/org/adempiere/impexp/ArrayExcelExporter.java b/org.adempiere.base/src/org/adempiere/impexp/ArrayExcelExporter.java
index 0dfff3c175..5e1f155011 100644
--- a/org.adempiere.base/src/org/adempiere/impexp/ArrayExcelExporter.java
+++ b/org.adempiere.base/src/org/adempiere/impexp/ArrayExcelExporter.java
@@ -22,7 +22,7 @@ import org.compiere.util.Msg;
import org.compiere.util.Util;
/**
- * Export excel from ArrayList of data
+ * Export to excel format (xlsx) from ArrayList of data
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
*
*/
@@ -30,6 +30,10 @@ public class ArrayExcelExporter extends AbstractXLSXExporter {
private Properties m_ctx = null;
private ArrayList> m_data = null;
+ /**
+ * @param ctx
+ * @param data
+ */
public ArrayExcelExporter(Properties ctx, ArrayList> data) {
super();
m_ctx = ctx;
diff --git a/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVExporter.java b/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVExporter.java
index db22edeeba..87a874a8aa 100644
--- a/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVExporter.java
+++ b/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVExporter.java
@@ -311,7 +311,10 @@ public class GridTabCSVExporter implements IGridTabExporter
}
}
- //add constraints to not allow certain tabs
+ /**
+ * @param gridTab
+ * @return error message or null
+ */
private String isValidTabToExport(GridTab gridTab){
String result=null;
@@ -323,6 +326,13 @@ public class GridTabCSVExporter implements IGridTabExporter
return result;
}
+ /**
+ * @param currentDetRow current detail row number
+ * @param tabMapDetails
+ * @param headArray column headers
+ * @param idxfld
+ * @return Detail Row(Map{Column Header, Value})
+ */
private Map resolveMasterDetailRow(int currentDetRow,Map tabMapDetails,ListheadArray,int idxfld){
Map activeRow = new HashMap();
Object value = null;
@@ -410,6 +420,14 @@ public class GridTabCSVExporter implements IGridTabExporter
return whereClau;
}
+ /**
+ * @param gridTab
+ * @param table
+ * @param column
+ * @param i row index
+ * @param headName
+ * @return column value
+ */
private Object resolveValue(GridTab gridTab, MTable table, MColumn column, int i, String headName) {
Object value = null;
if (headName.indexOf("[") >= 0 && headName.endsWith("]")) {
@@ -437,6 +455,12 @@ public class GridTabCSVExporter implements IGridTabExporter
return value;
}
+ /**
+ * @param selectColumn
+ * @param tableName
+ * @param record_id
+ * @return value of selectColumn
+ */
private Object queryExecute(String selectColumn,String tableName,Object record_id){
StringBuilder select = new StringBuilder("SELECT ")
@@ -447,6 +471,11 @@ public class GridTabCSVExporter implements IGridTabExporter
return DB.getSQLValueStringEx(null, select.toString(),record_id);
}
+ /**
+ * @param table
+ * @param column
+ * @return column header name
+ */
private String resolveColumnName(MTable table, MColumn column) {
StringBuilder name = new StringBuilder(column.getColumnName());
if (DisplayType.isLookup(column.getAD_Reference_ID())) {
@@ -473,6 +502,11 @@ public class GridTabCSVExporter implements IGridTabExporter
return name.toString();
}
+ /**
+ * Resolve extra columns for displayType. Implemented for DisplayType.Location.
+ * @param displayType
+ * @return list of extra columns to export
+ */
private ArrayList resolveSpecialColumnName(int displayType){
ArrayList specialColumnNames = new ArrayList();
@@ -514,6 +548,11 @@ public class GridTabCSVExporter implements IGridTabExporter
return "application/csv";
}
+ /**
+ * Get fields for export.
+ * @param gridTab
+ * @return fields for gridTab
+ */
private GridField[] getFields (GridTab gridTab) {
GridTable tableModel = gridTab.getTableModel();
GridField[] tmpFields = tableModel.getFields();
diff --git a/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVImporter.java b/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVImporter.java
index 9ac38aa740..767cfad433 100644
--- a/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVImporter.java
+++ b/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVImporter.java
@@ -129,6 +129,7 @@ public class GridTabCSVImporter implements IGridTabImporter
/** Logger */
private static final CLogger log = CLogger.getCLogger(GridTabCSVImporter.class);
+ @Override
public File fileImport(GridTab gridTab, List childs, InputStream filestream, Charset charset , String importMode) {
return fileImport(gridTab, childs, filestream, charset, importMode, null);
}//fileImport
@@ -307,7 +308,7 @@ public class GridTabCSVImporter implements IGridTabImporter
}
/**
- * Rollsback the trx and update the text in the file
+ * Rollback trx and update the text in log file
*/
private void rollbackTrx(){
trx.rollback();
@@ -319,7 +320,8 @@ public class GridTabCSVImporter implements IGridTabImporter
}
/**
- * Commit the trx and writes in the file
+ * Commit trx and writes in log file
+ * @return error message or null
*/
private String commitTrx(){
try {
@@ -336,7 +338,7 @@ public class GridTabCSVImporter implements IGridTabImporter
/**
* Map the header and returns the index where the detail starts
* @param gridTab
- * @return
+ * @return index where detail start
*/
private int mapCSVHeader(GridTab gridTab){
@@ -387,11 +389,12 @@ public class GridTabCSVImporter implements IGridTabImporter
}
return indxDetail;
- }//mapFileHeader
+ }//mapCSVHeader
/**
* Map details fields in the csv file
* @param indxDetail
+ * @param childs
*/
private void mapCSVDetail(int indxDetail, List childs){
@@ -458,10 +461,10 @@ public class GridTabCSVImporter implements IGridTabImporter
tabMapIndexes.put(currentDetailTab,header.size()-1);
}
- }//mapFileDetail
+ }//mapCSVDetail
/**
- * Pre process te file lookign for errors
+ * Pre-process the input csv file and look for errors
* @param processUI
* @param gridTab
* @param indxDetail
@@ -605,16 +608,16 @@ public class GridTabCSVImporter implements IGridTabImporter
} //createTrx
/**
- * Process the record for each row
- * First insert the master tab - if no errors found proceeds with the details tabs when existing
- * Stops at the first error found in the row
+ * Process the record for each row.
+ * First insert the master tab - if no errors found proceeds with the details tabs when existing.
+ * Stops at the first error found in the row.
* @param importMode
* @param gridTab
* @param indxDetail
* @param isDetail
* @param idx
* @param rowResult
- * @return
+ * @return message or empty string
*/
private String processRecord(String importMode, GridTab gridTab, int indxDetail, boolean isDetail, int idx, StringBuilder rowResult, List childs){
@@ -788,6 +791,11 @@ public class GridTabCSVImporter implements IGridTabImporter
throw new AdempiereException(msg);
}
+ /**
+ * @param currentRecord
+ * @param total
+ * @return status text
+ */
private String refreshImportStatus(int currentRecord, int total){
int percent = currentRecord * 100;
if (total > 0)
@@ -804,6 +812,12 @@ public class GridTabCSVImporter implements IGridTabImporter
}
}
+ /**
+ *
+ * @param document
+ * @param AD_Process_ID
+ * @return message
+ */
private String processDocAction(PO document, int AD_Process_ID){
int AD_Workflow_ID = MProcess.get(Env.getCtx(),AD_Process_ID).getAD_Workflow_ID();
@@ -838,6 +852,13 @@ public class GridTabCSVImporter implements IGridTabImporter
return isUpdateMode() || isMergeMode();
}
+ /**
+ * @param isKey
+ * @param isForeing
+ * @param isDetail
+ * @param headName
+ * @return column name
+ */
private String getColumnName(boolean isKey ,boolean isForeing ,boolean isDetail , String headName){
if(isKey){
@@ -864,6 +885,13 @@ public class GridTabCSVImporter implements IGridTabImporter
return headName;
}
+ /**
+ * Get extra fields for Location display type
+ * @param header
+ * @param tableName
+ * @param idx
+ * @return Extra fields for Location display type
+ */
private List getSpecialMColumn(List header, String tableName, int idx) {
List lsField = new ArrayList();
@@ -889,6 +917,12 @@ public class GridTabCSVImporter implements IGridTabImporter
return lsField;
}
+ /**
+ * Get column value from map, order by header
+ * @param header
+ * @param map
+ * @return Value list for row
+ */
private List