diff --git a/org.adempiere.base/src/com/akunagroup/uk/postcode/package-info.java b/org.adempiere.base/src/com/akunagroup/uk/postcode/package-info.java
new file mode 100644
index 0000000000..59c5510352
--- /dev/null
+++ b/org.adempiere.base/src/com/akunagroup/uk/postcode/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Deprecated
+ */
+package com.akunagroup.uk.postcode;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/base/AbstractProductPricing.java b/org.adempiere.base/src/org/adempiere/base/AbstractProductPricing.java
index 62758a9b8b..37fd717932 100644
--- a/org.adempiere.base/src/org/adempiere/base/AbstractProductPricing.java
+++ b/org.adempiere.base/src/org/adempiere/base/AbstractProductPricing.java
@@ -27,6 +27,9 @@ import org.compiere.model.I_M_RMALine;
import org.compiere.model.I_M_RequisitionLine;
import org.compiere.util.Env;
+/**
+ * Abstract base class for {@link IProductPricing} implementation
+ */
public abstract class AbstractProductPricing implements IProductPricing {
protected int m_M_Product_ID;
diff --git a/org.adempiere.base/src/org/adempiere/base/AnnotationBasedColumnCalloutFactory.java b/org.adempiere.base/src/org/adempiere/base/AnnotationBasedColumnCalloutFactory.java
index a608d59159..5767f0bd6a 100644
--- a/org.adempiere.base/src/org/adempiere/base/AnnotationBasedColumnCalloutFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/AnnotationBasedColumnCalloutFactory.java
@@ -47,9 +47,9 @@ import io.github.classgraph.ClassGraph.ScanResultProcessor;
import io.github.classgraph.ClassInfo;
/**
- *
+ * Abstract base class for annotation driven implementation of {@link IColumnCalloutFactory}.
+ * Subclass would override the {@link #getPackages()} method to provide the packages for {@link Callout} annotation scanning and discovery.
* @author hengsin
- *
*/
public abstract class AnnotationBasedColumnCalloutFactory extends AnnotationBasedFactory implements IColumnCalloutFactory {
diff --git a/org.adempiere.base/src/org/adempiere/base/BaseActivator.java b/org.adempiere.base/src/org/adempiere/base/BaseActivator.java
index eaf4dbbc6d..d042c7c473 100644
--- a/org.adempiere.base/src/org/adempiere/base/BaseActivator.java
+++ b/org.adempiere.base/src/org/adempiere/base/BaseActivator.java
@@ -36,8 +36,8 @@ import org.osgi.framework.Filter;
import org.osgi.util.tracker.ServiceTracker;
/**
+ * Activator for org.adempiere.base bundle.
* @author hengsin
- *
*/
public class BaseActivator implements BundleActivator {
diff --git a/org.adempiere.base/src/org/adempiere/base/DefaultAnnotationBasedColumnCalloutFactory.java b/org.adempiere.base/src/org/adempiere/base/DefaultAnnotationBasedColumnCalloutFactory.java
index dd85d0a133..5287c7c9c5 100644
--- a/org.adempiere.base/src/org/adempiere/base/DefaultAnnotationBasedColumnCalloutFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/DefaultAnnotationBasedColumnCalloutFactory.java
@@ -27,9 +27,8 @@ package org.adempiere.base;
import org.osgi.service.component.annotations.Component;
/**
- *
+ * Default implementation of {@link AnnotationBasedColumnCalloutFactory} that would scan the org.adempiere.model package
* @author hengsin
- *
*/
@Component(immediate = true, service = IColumnCalloutFactory.class)
public class DefaultAnnotationBasedColumnCalloutFactory extends AnnotationBasedColumnCalloutFactory {
diff --git a/org.adempiere.base/src/org/adempiere/base/DefaultAnnotationBasedEventManager.java b/org.adempiere.base/src/org/adempiere/base/DefaultAnnotationBasedEventManager.java
index 5005464de1..734932d245 100644
--- a/org.adempiere.base/src/org/adempiere/base/DefaultAnnotationBasedEventManager.java
+++ b/org.adempiere.base/src/org/adempiere/base/DefaultAnnotationBasedEventManager.java
@@ -26,6 +26,9 @@ package org.adempiere.base;
import org.osgi.service.component.annotations.Component;
+/**
+ * Default implementation of {@link AnnotationBasedEventManager} that would scan the org.adempiere.base.event.delegate package.
+ */
@Component(immediate = true, service = {DefaultAnnotationBasedEventManager.class})
public class DefaultAnnotationBasedEventManager extends AnnotationBasedEventManager {
diff --git a/org.adempiere.base/src/org/adempiere/base/DefaultAnnotationBasedProcessFactory.java b/org.adempiere.base/src/org/adempiere/base/DefaultAnnotationBasedProcessFactory.java
index 902406a334..1848846d10 100644
--- a/org.adempiere.base/src/org/adempiere/base/DefaultAnnotationBasedProcessFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/DefaultAnnotationBasedProcessFactory.java
@@ -27,9 +27,11 @@ package org.adempiere.base;
import org.osgi.service.component.annotations.Component;
/**
- *
+ * Default implementation of {@link AnnotationBasedProcessFactory} that would scan the following packages:
+ * "org.adempiere.process","org.compiere.impexp","org.compiere.print","org.compiere.process",
+ * "org.compiere.report","org.compiere.sla","org.compiere.wf","org.eevolution.process",
+ * "org.globalqss.process","org.idempiere.broadcast.process","org.idempiere.fa.process" and "org.idempiere.process"
* @author hengsin
- *
*/
@Component(immediate = true, service = IProcessFactory.class, property = {"service.ranking:Integer=-1"})
public final class DefaultAnnotationBasedProcessFactory extends AnnotationBasedProcessFactory {
diff --git a/org.adempiere.base/src/org/adempiere/base/IMappedDocumentFactory.java b/org.adempiere.base/src/org/adempiere/base/IMappedDocumentFactory.java
index 1fb5ce0f8d..2c542b72d5 100644
--- a/org.adempiere.base/src/org/adempiere/base/IMappedDocumentFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/IMappedDocumentFactory.java
@@ -53,9 +53,7 @@ public interface IMappedDocumentFactory {
public void removeMapping(String gaap, String tableName);
/**
- *
- * parameter class for doc supplier
- *
+ * Parameter class for doc supplier
*/
public final static class Parameter {
public MAcctSchema as;
diff --git a/org.adempiere.base/src/org/adempiere/base/ModelGeneratorApplication.java b/org.adempiere.base/src/org/adempiere/base/ModelGeneratorApplication.java
index 9d8bb8bb4b..0284e1c478 100644
--- a/org.adempiere.base/src/org/adempiere/base/ModelGeneratorApplication.java
+++ b/org.adempiere.base/src/org/adempiere/base/ModelGeneratorApplication.java
@@ -29,6 +29,7 @@ import org.osgi.framework.BundleException;
import org.osgi.framework.FrameworkUtil;
/**
+ * Eclipse application to launch the swing based model generation dialog.
* @author hengsin
* @author tbayen - command line start
*
diff --git a/org.adempiere.base/src/org/adempiere/base/PackInFolderApplication.java b/org.adempiere.base/src/org/adempiere/base/PackInFolderApplication.java
index b3e3135348..d581ae1ef1 100644
--- a/org.adempiere.base/src/org/adempiere/base/PackInFolderApplication.java
+++ b/org.adempiere.base/src/org/adempiere/base/PackInFolderApplication.java
@@ -41,8 +41,8 @@ import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
/**
+ * Eclipse application that would launch the org.adempiere.pipo2.PackInFolder process to import 2pack archives inside a predefine folder.
* @author Carlos Ruiz (globalqss)
- *
*/
public class PackInFolderApplication implements IApplication {
diff --git a/org.adempiere.base/src/org/adempiere/base/PostMigrationApplication.java b/org.adempiere.base/src/org/adempiere/base/PostMigrationApplication.java
index 236dadff44..ebdffa2129 100644
--- a/org.adempiere.base/src/org/adempiere/base/PostMigrationApplication.java
+++ b/org.adempiere.base/src/org/adempiere/base/PostMigrationApplication.java
@@ -25,8 +25,9 @@ import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
/**
+ * Eclipse application to run processes that must be executed (sequence check, role access update and synchronize terminology)
+ * after the execution of migration scripts
* @author hengsin
- *
*/
public class PostMigrationApplication implements IApplication {
diff --git a/org.adempiere.base/src/org/adempiere/base/annotation/Callouts.java b/org.adempiere.base/src/org/adempiere/base/annotation/Callouts.java
index a1a71d002a..67a4d89184 100644
--- a/org.adempiere.base/src/org/adempiere/base/annotation/Callouts.java
+++ b/org.adempiere.base/src/org/adempiere/base/annotation/Callouts.java
@@ -31,9 +31,8 @@ import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
- *
+ * To support the use of multiple {@link Callout} annotation
* @author hengsin
- *
*/
@Retention(RUNTIME)
@Target(ElementType.TYPE)
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 adfde08c8d..8dc403e106 100644
--- a/org.adempiere.base/src/org/adempiere/base/annotation/Process.java
+++ b/org.adempiere.base/src/org/adempiere/base/annotation/Process.java
@@ -18,6 +18,9 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
+/**
+ * Annotation for iDempiere process
+ */
@Retention(RUNTIME)
@Target(TYPE)
public @interface Process {
diff --git a/org.adempiere.base/src/org/adempiere/base/annotation/package-info.java b/org.adempiere.base/src/org/adempiere/base/annotation/package-info.java
new file mode 100644
index 0000000000..d1faa6211c
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/base/annotation/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide annotations for callout, model event, import event and process
+ */
+package org.adempiere.base.annotation;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/base/ds/package-info.java b/org.adempiere.base/src/org/adempiere/base/ds/package-info.java
new file mode 100644
index 0000000000..fbab64e5da
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/base/ds/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide service discovery implementation for OSGi declarative service.
+ */
+package org.adempiere.base.ds;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/base/equinox/package-info.java b/org.adempiere.base/src/org/adempiere/base/equinox/package-info.java
new file mode 100644
index 0000000000..4f8fbd0311
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/base/equinox/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide service discovery implementation for Equinox extension
+ */
+package org.adempiere.base.equinox;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/base/event/EventProperty.java b/org.adempiere.base/src/org/adempiere/base/event/EventProperty.java
index 05260d46f4..c6fb03bcac 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/EventProperty.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/EventProperty.java
@@ -14,9 +14,8 @@
package org.adempiere.base.event;
/**
- *
+ * Value object for name based event property
* @author hengsin
- *
*/
public class EventProperty {
public String name;
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/AfterLoadPref.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/AfterLoadPref.java
index 87d9ea8e9d..7a4fddf91a 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/AfterLoadPref.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/AfterLoadPref.java
@@ -32,14 +32,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
+/**
+ * Method annotation for handling of after load preference event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.PREF_AFTER_LOAD)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterLoadPref {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/AfterLogin.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/AfterLogin.java
index 78fbd2f430..d0ef43d4a8 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/AfterLogin.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/AfterLogin.java
@@ -32,14 +32,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
+/**
+ * Method annotation for handling of after login event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.AFTER_LOGIN)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterLogin {
}
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 72727a504d..2849399609 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
@@ -30,8 +30,7 @@ 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.
+ * To handle login event, create a subclass of this and implement the {@link #onAfterLogin(LoginEventData)} method.
* @author hengsin
*/
public abstract class AfterLoginEventDelegate extends EventDelegate {
@@ -44,7 +43,7 @@ public abstract class AfterLoginEventDelegate extends EventDelegate {
}
/**
- *
+ * Get data object for login event
* @return {@link LoginEventData}
*/
protected LoginEventData getLoginEventData() {
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/BroadcastMsg.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/BroadcastMsg.java
index c7cad53eff..a635c369a4 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/BroadcastMsg.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/BroadcastMsg.java
@@ -32,14 +32,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
+/**
+ * Method annotation for handling of broadcast message event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.BROADCAST_MESSAGE)
-/**
- *
- * @author hengsin
- *
- */
public @interface BroadcastMsg {
}
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 2abaccfcad..a83ce59405 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
@@ -27,12 +27,10 @@ package org.adempiere.base.event.annotations;
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.
- * Subclass should use {@link EventTopic} or one of its derived annotation to define the event topic to handle
+ * Subclass should use {@link EventTopic} or one of its derived annotation to define the event topic to handle.
* @author hengsin
- *
*/
public class EventDelegate {
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/EventTopic.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/EventTopic.java
index 6dd048da6e..7f61c281dd 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/EventTopic.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/EventTopic.java
@@ -31,13 +31,17 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
+/**
+ * Method annotation for OSGi event topic.
+ * Developer usually use one of the predefined event topic annotation (for e.g {@link AfterLogin}) instead of using this annotation directly.
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target({ METHOD, ANNOTATION_TYPE })
-/**
- *
- * @author hengsin
- *
- */
public @interface EventTopic {
+ /**
+ * Get OSGi event topic name
+ * @return event topic name
+ */
String topic();
}
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 a7c4608b4b..47745227d1 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
@@ -30,7 +30,7 @@ import org.osgi.service.event.Event;
/**
* 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.
+ * to annotate the event handling method.
* @author hengsin
*
* @param
@@ -49,6 +49,7 @@ public class ModelEventDelegate extends EventDelegate {
}
/**
+ * Get PO model for event
* @return PO model (MBPartner, MOrder, etc)
*/
protected T getModel() {
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/RequestSendEMail.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/RequestSendEMail.java
index 53a6b9805a..9db3619ad4 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/RequestSendEMail.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/RequestSendEMail.java
@@ -32,14 +32,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
+/**
+ * Method annotation for handling of send request email event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.REQUEST_SEND_EMAIL)
-/**
- *
- * @author hengsin
- *
- */
public @interface RequestSendEMail {
}
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 d8cc9a202d..83b17a1da1 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
@@ -58,7 +58,7 @@ public abstract class RequestSendEmailEventDelegate extends EventDelegate {
}
/**
- * Override this to handle event
+ * Override this to handle RequestSendEMail event
* @param requestSendEMailEventData
*/
protected abstract void onRequestSendEmail(RequestSendEMailEventData requestSendEMailEventData);
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 b4a70e65d0..bc0b3b613f 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
@@ -26,10 +26,12 @@ package org.adempiere.base.event.annotations;
import java.util.function.Function;
+import org.adempiere.base.AnnotationBasedEventManager;
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).
+ * This is use by {@link AnnotationBasedEventManager} and usually developer doesn't have to use this class directly.
* @author hengsin
*
*/
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterClose.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterClose.java
index 79b7344903..b8d36d6935 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterClose.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterClose.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for after close document action event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.DOC_AFTER_CLOSE)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterClose {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterComplete.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterComplete.java
index 334bd8f284..b89fb3eab8 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterComplete.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterComplete.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for after complete document action event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.DOC_AFTER_COMPLETE)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterComplete {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterPost.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterPost.java
index 1f02c4b5b9..7f33a65b26 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterPost.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterPost.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for after post document action event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.DOC_AFTER_POST)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterPost {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterPrepare.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterPrepare.java
index 5ee86bad23..5f4f1e7e21 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterPrepare.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterPrepare.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for after prepare document action event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.DOC_AFTER_PREPARE)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterPrepare {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterReactivate.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterReactivate.java
index 1c20700b08..033f918156 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterReactivate.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterReactivate.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for after re-activate document action event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.DOC_AFTER_REACTIVATE)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterReactivate {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterReverseAccrual.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterReverseAccrual.java
index de437dc922..31588a6047 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterReverseAccrual.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterReverseAccrual.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for after reverse accrual document action event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.DOC_AFTER_REVERSEACCRUAL)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterReverseAccrual {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterReverseCorrect.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterReverseCorrect.java
index d3312b34d6..105e65e159 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterReverseCorrect.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterReverseCorrect.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for after reverse correct document action event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.DOC_AFTER_REVERSECORRECT)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterReverseCorrect {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterVoid.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterVoid.java
index 4cf9c6c9b7..41a4740192 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterVoid.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/AfterVoid.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for after void document action event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.DOC_AFTER_VOID)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterVoid {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeClose.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeClose.java
index fec5518b79..d26e590219 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeClose.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeClose.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for before close document action event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.DOC_BEFORE_CLOSE)
-/**
- *
- * @author hengsin
- *
- */
public @interface BeforeClose {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeComplete.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeComplete.java
index 87841e786d..730afd869a 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeComplete.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeComplete.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for before complete document action event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.DOC_BEFORE_COMPLETE)
-/**
- *
- * @author hengsin
- *
- */
public @interface BeforeComplete {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforePost.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforePost.java
index a81cbcc38e..e03cc7eb88 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforePost.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforePost.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for before post document action event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.DOC_BEFORE_POST)
-/**
- *
- * @author hengsin
- *
- */
public @interface BeforePost {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforePrepare.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforePrepare.java
index 9098bf153e..00171bbe11 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforePrepare.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforePrepare.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for before prepare document action event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.DOC_BEFORE_PREPARE)
-/**
- *
- * @author hengsin
- *
- */
public @interface BeforePrepare {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeReactivate.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeReactivate.java
index c85abd6012..765574de7f 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeReactivate.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeReactivate.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for before re-activate document action event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.DOC_BEFORE_REACTIVATE)
-/**
- *
- * @author hengsin
- *
- */
public @interface BeforeReactivate {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeReverseAccrual.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeReverseAccrual.java
index 5521f2915f..8158261873 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeReverseAccrual.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeReverseAccrual.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for before reverse accrual document action event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.DOC_BEFORE_REVERSEACCRUAL)
-/**
- *
- * @author hengsin
- *
- */
public @interface BeforeReverseAccrual {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeReverseCorrect.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeReverseCorrect.java
index aefcb73f22..985bbc1596 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeReverseCorrect.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeReverseCorrect.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for before reverse correct document action event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.DOC_BEFORE_REVERSECORRECT)
-/**
- *
- * @author hengsin
- *
- */
public @interface BeforeReverseCorrect {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeVoid.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeVoid.java
index 3c98c0aa86..e7edae88df 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeVoid.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/BeforeVoid.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for before void document action event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.DOC_BEFORE_VOID)
-/**
- *
- * @author hengsin
- *
- */
public @interface BeforeVoid {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/DocAction.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/DocAction.java
index 7d32239ede..1d9eb478af 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/DocAction.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/DocAction.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for get available document actions event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.DOCACTION)
-/**
- *
- * @author hengsin
- *
- */
public @interface DocAction {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/FactsValidate.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/FactsValidate.java
index 808841249b..f35b979214 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/FactsValidate.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/FactsValidate.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for accounting facts validation event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.ACCT_FACTS_VALIDATE)
-/**
- *
- * @author hengsin
- *
- */
public @interface FactsValidate {
}
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 569dac6e61..19c20b68eb 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,9 +31,9 @@ import org.compiere.model.PO;
import org.osgi.service.event.Event;
/**
- * Event delegate for facts validate event.
+ * Event delegate for accounting facts validation 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.
+ * to annotate the event handling method.
* @author hengsin
*/
public abstract class FactsValidateDelegate extends ModelEventDelegate {
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/package-info.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/package-info.java
new file mode 100644
index 0000000000..252b3479de
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/doc/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide method annotations for handling of document action and posting events
+ */
+package org.adempiere.base.event.annotations.doc;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/AfterImport.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/AfterImport.java
index 959d6a10ae..6f6accacc8 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/AfterImport.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/AfterImport.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for after import event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.IMPORT_AFTER_IMPORT)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterImport {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/AfterValidate.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/AfterValidate.java
index 770549bb11..70f055b72a 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/AfterValidate.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/AfterValidate.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for after validate event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.IMPORT_AFTER_VALIDATE)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterValidate {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/BeforeImport.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/BeforeImport.java
index c2f54e3bbf..5eaf59e0d9 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/BeforeImport.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/BeforeImport.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for before import event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.IMPORT_BEFORE_IMPORT)
-/**
- *
- * @author hengsin
- *
- */
public @interface BeforeImport {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/BeforeValidate.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/BeforeValidate.java
index a7dd25d1d1..d8da900c00 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/BeforeValidate.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/BeforeValidate.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for before validate event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.IMPORT_BEFORE_VALIDATE)
-/**
- *
- * @author hengsin
- *
- */
public @interface BeforeValidate {
}
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 8aa26a9ba5..ca336168da 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
@@ -32,7 +32,7 @@ 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.
+ * to annotate the event handling method.
* @author hengsin
*/
public class ImportEventDelegate extends EventDelegate {
@@ -45,7 +45,7 @@ public class ImportEventDelegate extends EventDelegate {
}
/**
- *
+ * Get data object for import event
* @return {@link ImportEventData}
*/
protected ImportEventData getImportEventData() {
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/package-info.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/package-info.java
new file mode 100644
index 0000000000..257b5b0524
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/imp/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide annotation for the handling of import event
+ */
+package org.adempiere.base.event.annotations.imp;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/package-info.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/package-info.java
new file mode 100644
index 0000000000..43e7a2e4f3
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/package-info.java
@@ -0,0 +1,28 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide classes and annotation for OSGi event handling.
+ * Developer create subclass of event delegate (or one of its more specialized subclass like model event delegate) and
+ * uses method annotation to handle OSGi event.
+ */
+package org.adempiere.base.event.annotations;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterChange.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterChange.java
index 8dee0f4b4f..6b8bd3ca71 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterChange.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterChange.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for after change event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.PO_AFTER_CHANGE)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterChange {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterChangeReplication.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterChangeReplication.java
index a591d43d94..2e7288e2eb 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterChangeReplication.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterChangeReplication.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for replication after change event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.PO_AFTER_CHANGE_REPLICATION)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterChangeReplication {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterDelete.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterDelete.java
index 2b5c4cbe3f..123e50cc76 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterDelete.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterDelete.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for after delete event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.PO_AFTER_DELETE)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterDelete {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterNew.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterNew.java
index 19cebed68f..963ef7df6a 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterNew.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterNew.java
@@ -33,13 +33,12 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for after new event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.PO_AFTER_NEW)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterNew {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterNewReplication.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterNewReplication.java
index fa04446a03..d4f7d6dba6 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterNewReplication.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/AfterNewReplication.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for replication after new event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.PO_AFTER_NEW_REPLICATION)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterNewReplication {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/BeforeChange.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/BeforeChange.java
index 7860502332..cc47ffce34 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/BeforeChange.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/BeforeChange.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for before change event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.PO_BEFORE_CHANGE)
-/**
- *
- * @author hengsin
- *
- */
public @interface BeforeChange {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/BeforeDelete.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/BeforeDelete.java
index 207b89f927..b23cfb428e 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/BeforeDelete.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/BeforeDelete.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for before delete event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.PO_BEFORE_DELETE)
-/**
- *
- * @author hengsin
- *
- */
public @interface BeforeDelete {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/BeforeDeleteReplication.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/BeforeDeleteReplication.java
index c530e266fe..510975e507 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/BeforeDeleteReplication.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/BeforeDeleteReplication.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for replication before delete event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.PO_BEFORE_DELETE_REPLICATION)
-/**
- *
- * @author hengsin
- *
- */
public @interface BeforeDeleteReplication {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/BeforeNew.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/BeforeNew.java
index 0d85ba67b3..e575e7dbdc 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/BeforeNew.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/BeforeNew.java
@@ -33,13 +33,12 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for before new event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
-/**
- *
- * @author hengsin
- *
- */
@EventTopic(topic = IEventTopics.PO_BEFORE_NEW)
public @interface BeforeNew {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/PostCreate.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/PostCreate.java
index 559d4c939a..548812e84b 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/PostCreate.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/PostCreate.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for post create event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.PO_POST_CREATE)
-/**
- *
- * @author hengsin
- *
- */
public @interface PostCreate {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/PostDelete.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/PostDelete.java
index 3c78808d5a..2655b39c0e 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/PostDelete.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/PostDelete.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for post delete event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.PO_POST_DELETE)
-/**
- *
- * @author hengsin
- *
- */
public @interface PostDelete {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/PostUpdate.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/PostUpdate.java
index 4ca7ad6c2e..b5afc5ee53 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/PostUpdate.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/PostUpdate.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for post update event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.PO_POST_UPADTE)
-/**
- *
- * @author hengsin
- *
- */
public @interface PostUpdate {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/po/package-info.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/package-info.java
new file mode 100644
index 0000000000..9698b681a1
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/po/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide annotation for model (PO) event.
+ */
+package org.adempiere.base.event.annotations.po;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/process/AfterProcess.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/process/AfterProcess.java
index 9ad97980ff..fc31eaf6d0 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/process/AfterProcess.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/process/AfterProcess.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for after process event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.AFTER_PROCESS)
-/**
- *
- * @author hengsin
- *
- */
public @interface AfterProcess {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/process/BeforeProcess.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/process/BeforeProcess.java
index a2cf002662..185bfc63c9 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/process/BeforeProcess.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/process/BeforeProcess.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for before process event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.BEFORE_PROCESS)
-/**
- *
- * @author hengsin
- *
- */
public @interface BeforeProcess {
}
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/process/PostProcess.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/process/PostProcess.java
index 69c370e322..18a1328887 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/annotations/process/PostProcess.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/process/PostProcess.java
@@ -33,14 +33,13 @@ import java.lang.annotation.Target;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.base.event.annotations.EventTopic;
+/**
+ * Method annotation for post process event
+ * @author hengsin
+ */
@Retention(RUNTIME)
@Target(METHOD)
@EventTopic(topic = IEventTopics.POST_PROCESS)
-/**
- *
- * @author hengsin
- *
- */
public @interface PostProcess {
}
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 78a859c2dd..657daebfa5 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
@@ -32,7 +32,7 @@ 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.
+ * (AfterProcess, BeforeProcess or PostProcess) to annotate the event handling method.
* @author hengsin
*
*/
@@ -43,6 +43,7 @@ public class ProcessEventDelegate extends EventDelegate {
}
/**
+ * Get process info
* @return {@link ProcessInfo}
*/
protected ProcessInfo getProcessInfo() {
diff --git a/org.adempiere.base/src/org/adempiere/base/event/annotations/process/package-info.java b/org.adempiere.base/src/org/adempiere/base/event/annotations/process/package-info.java
new file mode 100644
index 0000000000..c7992288bd
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/base/event/annotations/process/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide annotation for process event
+ */
+package org.adempiere.base.event.annotations.process;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/base/event/delegate/AddressValidationEventDelegate.java b/org.adempiere.base/src/org/adempiere/base/event/delegate/AddressValidationEventDelegate.java
index 90d29e24c8..3b9f5e44d4 100644
--- a/org.adempiere.base/src/org/adempiere/base/event/delegate/AddressValidationEventDelegate.java
+++ b/org.adempiere.base/src/org/adempiere/base/event/delegate/AddressValidationEventDelegate.java
@@ -38,16 +38,14 @@ import org.compiere.model.MSysConfig;
import org.osgi.service.event.Event;
/**
- *
+ * Event delegate to perform validation for insert and update of MLocation record.
* @author hengsin
- *
*/
@EventTopicDelegate
@ModelEventTopic(modelClass = MLocation.class)
public class AddressValidationEventDelegate extends ModelEventDelegate {
/**
- *
* @param po
* @param event
*/
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 e6b454b5ff..fb6733ac06 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
@@ -48,15 +48,13 @@ import org.eevolution.model.MPPProductBOMLine;
import org.osgi.service.event.Event;
/**
- *
+ * Event delegate to implement auto produce for shipment
* @author hengsin
- *
*/
@EventTopicDelegate
@ModelEventTopic(modelClass = MInOut.class)
public class AutoProduceEventDelegate extends ModelEventDelegate {
/**
- *
* @param po
* @param event
*/
diff --git a/org.adempiere.base/src/org/adempiere/base/event/delegate/package-info.java b/org.adempiere.base/src/org/adempiere/base/event/delegate/package-info.java
new file mode 100644
index 0000000000..edb678b6fc
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/base/event/delegate/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide event delegate implementation for address validation and auto produce
+ */
+package org.adempiere.base.event.delegate;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/base/event/package-info.java b/org.adempiere.base/src/org/adempiere/base/event/package-info.java
new file mode 100644
index 0000000000..56353ffc35
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/base/event/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide interface and classes for working with and handling different types of OSGi events
+ */
+package org.adempiere.base.event;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/base/package-info.java b/org.adempiere.base/src/org/adempiere/base/package-info.java
new file mode 100644
index 0000000000..9ce4dc72b7
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/base/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide interface and default implementation of iDempiere core services (model factory, callout factory, etc)
+ */
+package org.adempiere.base;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/base/sso/ISSOPrincipalFactory.java b/org.adempiere.base/src/org/adempiere/base/sso/ISSOPrincipalFactory.java
index 2e3ebdd0ab..6508353a79 100644
--- a/org.adempiere.base/src/org/adempiere/base/sso/ISSOPrincipalFactory.java
+++ b/org.adempiere.base/src/org/adempiere/base/sso/ISSOPrincipalFactory.java
@@ -15,8 +15,8 @@ package org.adempiere.base.sso;
import org.compiere.model.I_SSO_PrincipalConfig;
/**
+ * Factory interface for single sign on service
* @author Logilite Technologies
- *
*/
public interface ISSOPrincipalFactory
{
diff --git a/org.adempiere.base/src/org/adempiere/base/sso/ISSOPrincipalService.java b/org.adempiere.base/src/org/adempiere/base/sso/ISSOPrincipalService.java
index 8156089495..908a822ffd 100644
--- a/org.adempiere.base/src/org/adempiere/base/sso/ISSOPrincipalService.java
+++ b/org.adempiere.base/src/org/adempiere/base/sso/ISSOPrincipalService.java
@@ -21,6 +21,7 @@ import javax.servlet.http.HttpServletResponse;
import org.compiere.util.Language;
/**
+ * Single sign on service interface
* @author Logilite Technologies
*/
public interface ISSOPrincipalService
diff --git a/org.adempiere.base/src/org/adempiere/base/sso/SSOUtils.java b/org.adempiere.base/src/org/adempiere/base/sso/SSOUtils.java
index d2431ceaa3..56447b0bd3 100644
--- a/org.adempiere.base/src/org/adempiere/base/sso/SSOUtils.java
+++ b/org.adempiere.base/src/org/adempiere/base/sso/SSOUtils.java
@@ -24,6 +24,7 @@ import org.compiere.model.MSSOPrincipalConfig;
import org.compiere.util.CCache;
/**
+ * Utility methods for single sign on support.
* @author Logilite Technologies
*/
public class SSOUtils
@@ -52,6 +53,10 @@ public class SSOUtils
ignoreResourceURL.add("res");
}
+ /**
+ * Get single sign on service
+ * @return single sign on service
+ */
public static ISSOPrincipalService getSSOPrincipalService()
{
ISSOPrincipalService principal = null;
@@ -91,9 +96,9 @@ public class SSOUtils
}
/**
- * Create Error page for error message
+ * Create HTML page for error message
* @param error
- * @return
+ * @return HTML error page
*/
public static String getCreateErrorResponce(String error)
{
@@ -118,10 +123,10 @@ public class SSOUtils
}
/**
- * if Resource request then it do not redirected to identity provider for authentication
+ * If request is a resource request, do not redirected to identity provider for authentication
* @param request
* @param isWebUI
- * @return
+ * @return true if request is a resource request
*/
public static boolean isResourceRequest(HttpServletRequest request, boolean isWebUI)
{
diff --git a/org.adempiere.base/src/org/adempiere/base/sso/package-info.java b/org.adempiere.base/src/org/adempiere/base/sso/package-info.java
new file mode 100644
index 0000000000..e124e10fbc
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/base/sso/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide interface and classes for single sign on support.
+ */
+package org.adempiere.base.sso;
\ No newline at end of file
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 c2c6d04f1f..2d2194b0e9 100644
--- a/org.adempiere.base/src/org/adempiere/base/upload/IUploadHandler.java
+++ b/org.adempiere.base/src/org/adempiere/base/upload/IUploadHandler.java
@@ -28,16 +28,18 @@ package org.adempiere.base.upload;
import org.compiere.model.MAuthorizationAccount;
/**
- * handler interface for upload request
+ * Handler interface for upload of media
* @author hengsin
*/
public interface IUploadHandler {
/**
+ * Get label/name for this handler.
* @return label for handler
*/
public String getLabel();
/**
+ * Upload media to external authorized account
* @param media
* @param account external account to upload to (for e.g, Google drive account)
* @return {@link UploadResponse}
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 4202ff6d4d..eaa42c3261 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,7 @@
package org.adempiere.base.upload;
/**
- * interface for upload service
+ * 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 65adf331a7..37e45eab79 100644
--- a/org.adempiere.base/src/org/adempiere/base/upload/UploadMedia.java
+++ b/org.adempiere.base/src/org/adempiere/base/upload/UploadMedia.java
@@ -28,9 +28,8 @@ package org.adempiere.base.upload;
import java.io.InputStream;
/**
- * representation of media
+ * Representation of upload media
* @author hengsin
- *
*/
public class UploadMedia {
@@ -54,6 +53,7 @@ public class UploadMedia {
}
/**
+ * Get content type of media
* @return content type of media
*/
public String getContentType() {
@@ -61,6 +61,7 @@ public class UploadMedia {
}
/**
+ * Get media name
* @return name/label of media
*/
public String getName() {
@@ -68,6 +69,7 @@ public class UploadMedia {
}
/**
+ * Get input stream for media content
* @return {@link InputStream} for media content
*/
public InputStream getInputStream() {
@@ -75,6 +77,7 @@ public class UploadMedia {
}
/**
+ * Get length of media content
* @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 6b54daf78b..b636ed882f 100644
--- a/org.adempiere.base/src/org/adempiere/base/upload/UploadResponse.java
+++ b/org.adempiere.base/src/org/adempiere/base/upload/UploadResponse.java
@@ -28,7 +28,6 @@ package org.adempiere.base.upload;
/**
* Response from upload service
* @author hengsin
- *
*/
public class UploadResponse {
@@ -46,6 +45,7 @@ public class UploadResponse {
}
/**
+ * Get external link URL to the uploaded file
* @return link URL to the uploaded file
*/
public String getLink() {
@@ -53,6 +53,7 @@ public class UploadResponse {
}
/**
+ * Get label for the uploaded file
* @return label for the uploaded file
*/
public String getLinkLabel() {
diff --git a/org.adempiere.base/src/org/adempiere/base/upload/package-info.java b/org.adempiere.base/src/org/adempiere/base/upload/package-info.java
new file mode 100644
index 0000000000..b6a82d2d62
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/base/upload/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide interface and classes for external upload support.
+ */
+package org.adempiere.base.upload;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/AdempiereException.java b/org.adempiere.base/src/org/adempiere/exceptions/AdempiereException.java
index a7bf65ad68..8a248d08cb 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/AdempiereException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/AdempiereException.java
@@ -20,16 +20,15 @@ import org.compiere.util.Env;
import org.compiere.util.Msg;
/**
- * Runtime exception that occurs inside the Adempiere core
+ * Runtime exception that occurs inside iDempiere core
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
*/
public class AdempiereException extends RuntimeException {
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 2340179640558569534L;
-
/**
* Default Constructor (saved logger error will be used as message)
*/
@@ -37,7 +36,6 @@ public class AdempiereException extends RuntimeException {
this(getMessageFromLogger());
}
-
/**
* @param message
*/
@@ -67,11 +65,14 @@ public class AdempiereException extends RuntimeException {
return msg;
}
+ /**
+ * Get environment context
+ * @return context
+ */
protected Properties getCtx() {
return Env.getCtx();
}
-
/**
* @return error message from logger
* @see org.compiere.util.CLogger#retrieveError()
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/AverageCostingNegativeQtyException.java b/org.adempiere.base/src/org/adempiere/exceptions/AverageCostingNegativeQtyException.java
index 0421e5b606..f46a59e9c2 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/AverageCostingNegativeQtyException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/AverageCostingNegativeQtyException.java
@@ -15,7 +15,7 @@
package org.adempiere.exceptions;
/**
- *
+ * Exception raise when current quantity of a product's average costing record become negative
* @author hengsin
*
*/
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/AverageCostingZeroQtyException.java b/org.adempiere.base/src/org/adempiere/exceptions/AverageCostingZeroQtyException.java
index e58426f72b..03bb03b0ec 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/AverageCostingZeroQtyException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/AverageCostingZeroQtyException.java
@@ -15,9 +15,8 @@
package org.adempiere.exceptions;
/**
- *
+ * Exception raise when current quantity of a product's average costing record is zero
* @author hengsin
- *
*/
public class AverageCostingZeroQtyException extends AdempiereException {
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/DBException.java b/org.adempiere.base/src/org/adempiere/exceptions/DBException.java
index 590b0e88d1..eca71b462c 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/DBException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/DBException.java
@@ -28,7 +28,6 @@ import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Util;
-
/**
* This RuntimeException is used to pass SQLException up the chain of calling
* methods to determine what to do where needed.
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/PORelationException.java b/org.adempiere.base/src/org/adempiere/exceptions/PORelationException.java
index 400a1b1dcd..d70e6b2308 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/PORelationException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/PORelationException.java
@@ -15,12 +15,13 @@ package org.adempiere.exceptions;
import java.util.logging.Level;
+import org.adempiere.model.MRelationType;
import org.compiere.model.PO;
import org.compiere.util.CLogger;
import org.compiere.util.Msg;
/**
- *
+ * Exception related to invalid {@link MRelationType} configuration.
* @author Tobias Schoeneberg, www.metas.de - FR [ 2897194 ] Advanced Zoom and
* RelationTypes
*/
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/TaxCriteriaNotFoundException.java b/org.adempiere.base/src/org/adempiere/exceptions/TaxCriteriaNotFoundException.java
index aef41e77e6..25bce8991a 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/TaxCriteriaNotFoundException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/TaxCriteriaNotFoundException.java
@@ -13,7 +13,6 @@
*****************************************************************************/
package org.adempiere.exceptions;
-
/**
* Throw when a tax criteria was not found
* @author Teo Sarca, www.arhipac.ro
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/WarehouseInvalidForOrgException.java b/org.adempiere.base/src/org/adempiere/exceptions/WarehouseInvalidForOrgException.java
index fed9d5bb69..8f8ce12ab2 100644
--- a/org.adempiere.base/src/org/adempiere/exceptions/WarehouseInvalidForOrgException.java
+++ b/org.adempiere.base/src/org/adempiere/exceptions/WarehouseInvalidForOrgException.java
@@ -15,7 +15,6 @@
*****************************************************************************/
package org.adempiere.exceptions;
-
/**
* Throw when there is no Warehouse for Organization.
* @author victor.perez@e-evolution.com, www.e-evolution.com
diff --git a/org.adempiere.base/src/org/adempiere/exceptions/package-info.java b/org.adempiere.base/src/org/adempiere/exceptions/package-info.java
new file mode 100644
index 0000000000..12cfbd9a37
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/exceptions/package-info.java
@@ -0,0 +1,27 @@
+
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide exception classes
+ */
+package org.adempiere.exceptions;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/impexp/package-info.java b/org.adempiere.base/src/org/adempiere/impexp/package-info.java
new file mode 100644
index 0000000000..4b8dbb59f4
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/impexp/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide classes for import and export of data using csv or excel format
+ */
+package org.adempiere.impexp;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/model/CalloutInfoWindow.java b/org.adempiere.base/src/org/adempiere/model/CalloutInfoWindow.java
index 567bba8f10..7415b55584 100644
--- a/org.adempiere.base/src/org/adempiere/model/CalloutInfoWindow.java
+++ b/org.adempiere.base/src/org/adempiere/model/CalloutInfoWindow.java
@@ -33,8 +33,8 @@ import org.compiere.util.DisplayType;
import org.compiere.util.Env;
/**
+ * Callout for AD_InfoWindow and AD_InfoColumn
* @author hengsin
- *
*/
@Callout(tableName = "AD_InfoWindow", columnName = "AD_Table_ID")
@Callout(tableName = "AD_InfoColumn", columnName = {"AD_Element_ID","AD_Reference_ID"})
diff --git a/org.adempiere.base/src/org/adempiere/model/DocActionDelegate.java b/org.adempiere.base/src/org/adempiere/model/DocActionDelegate.java
index 6b3a30e547..2fb7ae2616 100644
--- a/org.adempiere.base/src/org/adempiere/model/DocActionDelegate.java
+++ b/org.adempiere.base/src/org/adempiere/model/DocActionDelegate.java
@@ -50,7 +50,7 @@ import org.compiere.util.TimeUtil;
import org.compiere.util.Util;
/**
- * Helper class for implementation of {@link DocAction} interface.
+ * Helper class to simplify the implementation of {@link DocAction} interface.
* @see {@link MProjectIssue} for example usage.
* @author hengsin
*/
diff --git a/org.adempiere.base/src/org/adempiere/model/GenericPO.java b/org.adempiere.base/src/org/adempiere/model/GenericPO.java
index 4d9f644c27..23656aa137 100644
--- a/org.adempiere.base/src/org/adempiere/model/GenericPO.java
+++ b/org.adempiere.base/src/org/adempiere/model/GenericPO.java
@@ -34,7 +34,7 @@ import org.compiere.process.DocAction;
/**
* Generic PO implementation, this can be use together with ModelValidator as alternative to the classic
* generated model class and extend ( X_ and M_ ) approach.
- *
+ *
* Originally for used to insert/update data from adempieredata.xml file in 2pack.
* @author Marco LOMBARDO
* @contributor Low Heng Sin
@@ -155,7 +155,7 @@ public class GenericPO extends PO implements DocAction {
return docActionDelegate.getDocStatus();
}
- /**************************************************************************
+ /**
* Process document
* @param processAction document action
* @return true if performed
@@ -280,7 +280,7 @@ public class GenericPO extends PO implements DocAction {
return docActionDelegate.reActivateIt();
} // reActivateIt
- /*************************************************************************
+ /**
* Get Summary
* @return Summary of Document
*/
@@ -348,7 +348,7 @@ public class GenericPO extends PO implements DocAction {
*/
class PropertiesWrapper extends Properties {
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 8887531951501323594L;
protected Properties source;
diff --git a/org.adempiere.base/src/org/adempiere/model/GridTabWrapper.java b/org.adempiere.base/src/org/adempiere/model/GridTabWrapper.java
index 40f01efbd4..6f18a1254f 100644
--- a/org.adempiere.base/src/org/adempiere/model/GridTabWrapper.java
+++ b/org.adempiere.base/src/org/adempiere/model/GridTabWrapper.java
@@ -28,7 +28,7 @@ import org.compiere.util.CLogger;
import org.compiere.util.Env;
/**
- * Wrap GridTab to ADempiere Model Interface (i.e. generated interfaces).
+ * Wrap GridTab to iDempiere Model Interface (i.e. generated interfaces).
* Usage example:
*
* I_A_Asset_Disposed bean = GridTabWrapper.create(mTab, I_A_Asset_Disposed.class);
@@ -44,10 +44,10 @@ public class GridTabWrapper implements InvocationHandler
/**
* Create wrapper of type cl for gridTab.
- * @param
+ * @param iDempiere Model Interface (i.e. generated I_* interfaces) type
* @param gridTab
- * @param cl
- * @return wrapper instance for gridTab
+ * @param cl iDempiere Model Interface (i.e. generated I_* interfaces) class
+ * @return wrapped instance for gridTab
*/
@SuppressWarnings("unchecked")
public static T create(GridTab gridTab, Class cl)
@@ -68,7 +68,7 @@ public class GridTabWrapper implements InvocationHandler
this.m_gridTab = gridTab;
}
-// @Override
+ @Override
public Object invoke(Object proxy, Method method, Object[] args)
throws Throwable
{
@@ -133,7 +133,8 @@ public class GridTabWrapper implements InvocationHandler
}
/**
- * @return GridTab
+ * Get wrap GridTab instance
+ * @return Wrap grid tab instance
*/
public GridTab getGridTab()
{
@@ -151,12 +152,12 @@ public class GridTabWrapper implements InvocationHandler
}
/**
- * Load object that is referenced by given property.
+ * Load object that is referenced by given property.
* Example: getReferencedObject("M_Product", method) should load the M_Product record
* with ID given by M_Product_ID property name;
* @param propertyName
* @param method
- * @return
+ * @return referenced instance
*/
private final Object getReferencedObject(String propertyName, Method method)
{
diff --git a/org.adempiere.base/src/org/adempiere/model/IAddressValidation.java b/org.adempiere.base/src/org/adempiere/model/IAddressValidation.java
index a5d98d5ced..9d597daf92 100644
--- a/org.adempiere.base/src/org/adempiere/model/IAddressValidation.java
+++ b/org.adempiere.base/src/org/adempiere/model/IAddressValidation.java
@@ -20,7 +20,6 @@ import org.compiere.model.MAddressTransaction;
/**
* Address validation interface
* @author Elaine
- *
*/
public interface IAddressValidation {
/**
diff --git a/org.adempiere.base/src/org/adempiere/model/IInfoColumn.java b/org.adempiere.base/src/org/adempiere/model/IInfoColumn.java
index 1b40e6d9a2..596c451849 100644
--- a/org.adempiere.base/src/org/adempiere/model/IInfoColumn.java
+++ b/org.adempiere.base/src/org/adempiere/model/IInfoColumn.java
@@ -21,7 +21,6 @@ import org.compiere.model.MInfoColumn;
* @see MInfoProcess
* @see MInfoRelated
* @author hieplq
- *
*/
public interface IInfoColumn {
/**
@@ -31,7 +30,7 @@ public interface IInfoColumn {
public int getInfoColumnID ();
/**
- * Object MInfoColumn
+ * Get MInfoColumn instance
* @return MInfoColumn
*/
public MInfoColumn getAD_InfoColumn ();
diff --git a/org.adempiere.base/src/org/adempiere/model/IShipmentProcessor.java b/org.adempiere.base/src/org/adempiere/model/IShipmentProcessor.java
index bc060919ec..5c5feaaf5a 100644
--- a/org.adempiere.base/src/org/adempiere/model/IShipmentProcessor.java
+++ b/org.adempiere.base/src/org/adempiere/model/IShipmentProcessor.java
@@ -21,7 +21,6 @@ import org.compiere.model.MShippingTransaction;
/**
* Online shipment processor interface
* @author Low Heng Sin
- *
*/
public interface IShipmentProcessor
{
diff --git a/org.adempiere.base/src/org/adempiere/model/ITaxProvider.java b/org.adempiere.base/src/org/adempiere/model/ITaxProvider.java
index 993f9a6cfe..89b4a7dd90 100644
--- a/org.adempiere.base/src/org/adempiere/model/ITaxProvider.java
+++ b/org.adempiere.base/src/org/adempiere/model/ITaxProvider.java
@@ -27,7 +27,6 @@ import org.compiere.process.ProcessInfo;
* @author Elaine
*
* @contributor Murilo H. Torquato
- *
*/
public interface ITaxProvider {
diff --git a/org.adempiere.base/src/org/adempiere/model/ImportValidator.java b/org.adempiere.base/src/org/adempiere/model/ImportValidator.java
index 53602c223b..14c1c19eea 100644
--- a/org.adempiere.base/src/org/adempiere/model/ImportValidator.java
+++ b/org.adempiere.base/src/org/adempiere/model/ImportValidator.java
@@ -1,6 +1,24 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.adempiere.model;
import org.adempiere.process.ImportProcess;
diff --git a/org.adempiere.base/src/org/adempiere/model/MBroadcastMessage.java b/org.adempiere.base/src/org/adempiere/model/MBroadcastMessage.java
index 82ec1cd7c3..9d9fe2e942 100644
--- a/org.adempiere.base/src/org/adempiere/model/MBroadcastMessage.java
+++ b/org.adempiere.base/src/org/adempiere/model/MBroadcastMessage.java
@@ -25,10 +25,9 @@ import org.idempiere.cache.ImmutableIntPOCache;
import org.idempiere.cache.ImmutablePOSupport;
/**
- *
+ * Extended model class for AD_BroadcastMessage
* @author Vivek
* @author Deepak Pansheriya
- *
*/
public class MBroadcastMessage extends X_AD_BroadcastMessage implements ImmutablePOSupport
{
@@ -40,11 +39,11 @@ public class MBroadcastMessage extends X_AD_BroadcastMessage implements Immutabl
static private ImmutableIntPOCache s_cache = new ImmutableIntPOCache("AD_BroadcastMessage", 30, 60);
/**
- * UUID based Constructor
- * @param ctx Context
- * @param AD_BroadcastMessage_UU UUID key
- * @param trxName Transaction
- */
+ * UUID based Constructor
+ * @param ctx Context
+ * @param AD_BroadcastMessage_UU UUID key
+ * @param trxName Transaction
+ */
public MBroadcastMessage(Properties ctx, String AD_BroadcastMessage_UU, String trxName) {
super(ctx, AD_BroadcastMessage_UU, trxName);
}
@@ -70,7 +69,7 @@ public class MBroadcastMessage extends X_AD_BroadcastMessage implements Immutabl
}
/**
- *
+ * Copy constructor
* @param copy
*/
public MBroadcastMessage(MBroadcastMessage copy)
@@ -79,7 +78,7 @@ public class MBroadcastMessage extends X_AD_BroadcastMessage implements Immutabl
}
/**
- *
+ * Copy constructor
* @param ctx
* @param copy
*/
@@ -89,7 +88,7 @@ public class MBroadcastMessage extends X_AD_BroadcastMessage implements Immutabl
}
/**
- *
+ * Copy constructor
* @param ctx
* @param copy
* @param trxName
@@ -220,7 +219,7 @@ public class MBroadcastMessage extends X_AD_BroadcastMessage implements Immutabl
* @param windowUUID of the window
* @param text of the link
* @return the URL link to set in the broadcast message
- * */
+ */
public String getUrlZoom(PO po, String windowUUID, String text) {
StringBuilder url = new StringBuilder("");
url.append("
+ * Formal definition for a set of data record pairs.
*
* @author Tobias Schoeneberg, www.metas.de - FR [ 2897194 ] Advanced Zoom and
* RelationTypes
@@ -62,7 +63,7 @@ public class MRelationType extends X_AD_RelationType implements IZoomProvider {
* Warning: Doesn't support POs with more or less than one key
* column.
*/
- final static String SQL =
+ protected final static String SQL =
" SELECT "
+ " rt.AD_RelationType_ID"
+ ", rt.Name"
@@ -89,9 +90,9 @@ public class MRelationType extends X_AD_RelationType implements IZoomProvider {
+ " AND tab.AD_Key=?"
+ " ORDER BY rt.Name";
- final static String SQL_WINDOW_NAME = "SELECT Name FROM AD_Window WHERE AD_WINDOW_ID=?";
+ protected final static String SQL_WINDOW_NAME = "SELECT Name FROM AD_Window WHERE AD_WINDOW_ID=?";
- final static String SQL_WINDOW_NAME_TRL = "SELECT Name FROM AD_Window_Trl WHERE AD_WINDOW_ID=? AND AD_LANGUAGE=?";
+ protected final static String SQL_WINDOW_NAME_TRL = "SELECT Name FROM AD_Window_Trl WHERE AD_WINDOW_ID=? AND AD_LANGUAGE=?";
/**
* generated serial id
@@ -101,11 +102,11 @@ public class MRelationType extends X_AD_RelationType implements IZoomProvider {
public int destinationRefId;
/**
- * UUID based Constructor
- * @param ctx Context
- * @param AD_RelationType_UU UUID key
- * @param trxName Transaction
- */
+ * UUID based Constructor
+ * @param ctx Context
+ * @param AD_RelationType_UU UUID key
+ * @param trxName Transaction
+ */
public MRelationType(Properties ctx, String AD_RelationType_UU, String trxName) {
super(ctx, AD_RelationType_UU, trxName);
}
@@ -139,7 +140,7 @@ public class MRelationType extends X_AD_RelationType implements IZoomProvider {
}
/**
- * Returns the types that define a relation which contains the given PO.
+ * Returns the types that define a relation which contains the given PO.
* Explicit types are returned even if they don't actually contain the given
* PO.
*
diff --git a/org.adempiere.base/src/org/adempiere/model/MShipperFacade.java b/org.adempiere.base/src/org/adempiere/model/MShipperFacade.java
index 7af0e73d36..7df9639f59 100644
--- a/org.adempiere.base/src/org/adempiere/model/MShipperFacade.java
+++ b/org.adempiere.base/src/org/adempiere/model/MShipperFacade.java
@@ -21,7 +21,6 @@ import org.compiere.util.DB;
/**
* Facade for MShipper, providing accessor method for custom field
* @author Low Heng Sin
- *
*/
public class MShipperFacade
{
@@ -38,7 +37,7 @@ public class MShipperFacade
}
/**
- * @return MShipper
+ * @return wrap shipper instance
*/
public MShipper getMShipper()
{
@@ -46,7 +45,7 @@ public class MShipperFacade
}
/**
- * @return MShippingProcessor
+ * @return shipping processor instance for wrap shipper
*/
private MShippingProcessor getShippingProcessor()
{
@@ -64,7 +63,7 @@ public class MShipperFacade
}
/**
- * @return connection key
+ * @return connection key for shipping processor
*/
public String getConnectionKey()
{
@@ -72,7 +71,7 @@ public class MShipperFacade
}
/**
- * @return connection password
+ * @return connection password for shipping processor
*/
public String getConnectionPassword()
{
@@ -80,7 +79,7 @@ public class MShipperFacade
}
/**
- * @return connection user id
+ * @return connection user id for shipping processor
*/
public String getUserID()
{
@@ -88,7 +87,7 @@ public class MShipperFacade
}
/**
- * @return connection host address
+ * @return connection host address for shipping processor
*/
public String getHostAddress()
{
@@ -96,7 +95,7 @@ public class MShipperFacade
}
/**
- * @return optional connection proxy address
+ * @return optional connection proxy address for shipping processor
*/
public String getProxyAddress()
{
@@ -104,7 +103,7 @@ public class MShipperFacade
}
/**
- * @return connection port
+ * @return connection port for shipping processor
*/
public int getHostPort()
{
@@ -112,7 +111,7 @@ public class MShipperFacade
}
/**
- * @return proxy user id
+ * @return proxy user id for shipping processor
*/
public String getProxyLogon()
{
@@ -120,7 +119,7 @@ public class MShipperFacade
}
/**
- * @return proxy password
+ * @return proxy password for shipping processor
*/
public String getProxyPassword()
{
@@ -128,7 +127,7 @@ public class MShipperFacade
}
/**
- * @return proxy port
+ * @return proxy port for shipping processor
*/
public int getProxyPort()
{
@@ -136,7 +135,7 @@ public class MShipperFacade
}
/**
- * @return shipping service path
+ * @return shipping service path for shipping processor
*/
public String getServicePath()
{
@@ -144,7 +143,7 @@ public class MShipperFacade
}
/**
- * @return shipping service code
+ * @return shipping service code
*/
public String getShippingServiceCode()
{
@@ -153,7 +152,7 @@ public class MShipperFacade
/**
* @param AD_Org_ID
- * @return shipping service account
+ * @return shipper account
*/
public String getShipperAccount(int AD_Org_ID)
{
diff --git a/org.adempiere.base/src/org/adempiere/model/MTabCustomization.java b/org.adempiere.base/src/org/adempiere/model/MTabCustomization.java
index 6c51c3bf97..74711cdedc 100644
--- a/org.adempiere.base/src/org/adempiere/model/MTabCustomization.java
+++ b/org.adempiere.base/src/org/adempiere/model/MTabCustomization.java
@@ -31,6 +31,9 @@ import org.compiere.model.Query;
import org.compiere.model.X_AD_Tab_Customization;
import org.compiere.util.Util;
+/**
+ * Extended model class for AD_Tab_Customization
+ */
public class MTabCustomization extends X_AD_Tab_Customization {
/**
* generated serial id
diff --git a/org.adempiere.base/src/org/adempiere/model/MWizardProcess.java b/org.adempiere.base/src/org/adempiere/model/MWizardProcess.java
index 1c609fc598..6a1731541b 100644
--- a/org.adempiere.base/src/org/adempiere/model/MWizardProcess.java
+++ b/org.adempiere.base/src/org/adempiere/model/MWizardProcess.java
@@ -21,6 +21,9 @@ import java.util.Properties;
import org.compiere.model.Query;
import org.compiere.model.X_AD_WizardProcess;
+/**
+ * Extended model class for AD_WizardProcess
+ */
public class MWizardProcess extends X_AD_WizardProcess {
/**
* generated serial id
diff --git a/org.adempiere.base/src/org/adempiere/model/MWlistboxCustomization.java b/org.adempiere.base/src/org/adempiere/model/MWlistboxCustomization.java
index b910943ea4..7bbc2e402f 100644
--- a/org.adempiere.base/src/org/adempiere/model/MWlistboxCustomization.java
+++ b/org.adempiere.base/src/org/adempiere/model/MWlistboxCustomization.java
@@ -27,6 +27,9 @@ import org.compiere.model.Query;
import org.compiere.model.X_AD_Wlistbox_Customization;
import org.compiere.util.Util;
+/**
+ * Extended model class for AD_Wlistbox_Customization
+ */
public class MWlistboxCustomization extends X_AD_Wlistbox_Customization {
/**
diff --git a/org.adempiere.base/src/org/adempiere/model/POWrapper.java b/org.adempiere.base/src/org/adempiere/model/POWrapper.java
index 70dcd495d3..ed3efb57fa 100644
--- a/org.adempiere.base/src/org/adempiere/model/POWrapper.java
+++ b/org.adempiere.base/src/org/adempiere/model/POWrapper.java
@@ -25,8 +25,8 @@ import org.compiere.model.PO;
import org.compiere.util.CLogger;
/**
- * Wrap a PO object to a given interface.
- * Example
+ * Wrap a PO object to a given interface.
+ * Example usage:
*
* public interface I_C_Invoice_Customized
* {
@@ -48,10 +48,10 @@ public class POWrapper implements InvocationHandler
{
/**
* Create wrapper of type cl for po
- * @param
+ * @param iDempiere model interface type
* @param po
- * @param cl interface class
- * @return POWrapper instance
+ * @param cl iDempiere model interface class
+ * @return wrapped instance
*/
@SuppressWarnings("unchecked")
public static T create(Object po, Class cl)
@@ -68,6 +68,7 @@ public class POWrapper implements InvocationHandler
}
/**
+ * Get wrapped PO instance
* @param
* @param model
* @return the wrapped PO
diff --git a/org.adempiere.base/src/org/adempiere/model/ProductPriceValidator.java b/org.adempiere.base/src/org/adempiere/model/ProductPriceValidator.java
index 6f1920a112..22b3e5cf3c 100644
--- a/org.adempiere.base/src/org/adempiere/model/ProductPriceValidator.java
+++ b/org.adempiere.base/src/org/adempiere/model/ProductPriceValidator.java
@@ -32,7 +32,6 @@ import org.compiere.util.Env;
/**
* Model validator to sync corresponding price list with the price list schema and base price list.
* @author Elaine
- *
*/
public class ProductPriceValidator implements ModelValidator {
diff --git a/org.adempiere.base/src/org/adempiere/model/PromotionRule.java b/org.adempiere.base/src/org/adempiere/model/PromotionRule.java
index 33c848e31f..e0a6add5fa 100644
--- a/org.adempiere.base/src/org/adempiere/model/PromotionRule.java
+++ b/org.adempiere.base/src/org/adempiere/model/PromotionRule.java
@@ -44,7 +44,6 @@ import org.compiere.util.Env;
/**
* Static helper methods for promotion rule (M_Promotion)
* @author hengsin
- *
*/
public class PromotionRule {
diff --git a/org.adempiere.base/src/org/adempiere/model/PromotionValidator.java b/org.adempiere.base/src/org/adempiere/model/PromotionValidator.java
index 89e0fd9e0a..60627eb423 100644
--- a/org.adempiere.base/src/org/adempiere/model/PromotionValidator.java
+++ b/org.adempiere.base/src/org/adempiere/model/PromotionValidator.java
@@ -25,9 +25,8 @@ import org.compiere.model.PO;
import org.compiere.util.DB;
/**
- *
+ * Model validator for {@link MOrder} for application of promotion rules.
* @author hengsin
- *
*/
public class PromotionValidator implements ModelValidator {
diff --git a/org.adempiere.base/src/org/adempiere/model/ShippingPackage.java b/org.adempiere.base/src/org/adempiere/model/ShippingPackage.java
index 8b56d141d4..67439b9cf2 100644
--- a/org.adempiere.base/src/org/adempiere/model/ShippingPackage.java
+++ b/org.adempiere.base/src/org/adempiere/model/ShippingPackage.java
@@ -16,9 +16,8 @@ package org.adempiere.model;
import java.math.BigDecimal;
/**
- *
+ * Shipping package value object
* @author Elaine
- *
*/
public class ShippingPackage
{
diff --git a/org.adempiere.base/src/org/adempiere/model/ZoomInfoFactory.java b/org.adempiere.base/src/org/adempiere/model/ZoomInfoFactory.java
index 0e5081132d..165d30a78e 100644
--- a/org.adempiere.base/src/org/adempiere/model/ZoomInfoFactory.java
+++ b/org.adempiere.base/src/org/adempiere/model/ZoomInfoFactory.java
@@ -24,7 +24,7 @@ import org.compiere.model.PO;
import org.compiere.util.CLogger;
/**
- *
+ * Static factory methods for zoom info
* @author Tobias Schoeneberg, www.metas.de - FR [ 2897194 ] Advanced Zoom and
* RelationTypes
*/
diff --git a/org.adempiere.base/src/org/adempiere/model/package-info.java b/org.adempiere.base/src/org/adempiere/model/package-info.java
new file mode 100644
index 0000000000..398c6cd39e
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/model/package-info.java
@@ -0,0 +1,31 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * One of the package that provide extended model class for iDempiere core tables.
+ * Provide generic PO implementation that doesn't use generated model class.
+ * Provide interface for tax provider, shipment processor, zoom provider and address validation.
+ * Provide iDempiere model interface (I_*) wrapper for PO and GridTab.
+ * Provide implementation of order promotion rule and zoom across targets.
+ * @see org.compiere.model
+ */
+package org.adempiere.model;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/pdf/Document.java b/org.adempiere.base/src/org/adempiere/pdf/Document.java
index 33639da702..d0453178ac 100644
--- a/org.adempiere.base/src/org/adempiere/pdf/Document.java
+++ b/org.adempiere.base/src/org/adempiere/pdf/Document.java
@@ -33,9 +33,8 @@ import com.lowagie.text.pdf.PdfTemplate;
import com.lowagie.text.pdf.PdfWriter;
/**
- * Generate PDF document using iText (openpdf)
+ * Create PDF document from {@link Pageable} using iText (openpdf)
* @author Low Heng Sin
- *
*/
public class Document {
diff --git a/org.adempiere.base/src/org/adempiere/pdf/package-info.java b/org.adempiere.base/src/org/adempiere/pdf/package-info.java
new file mode 100644
index 0000000000..92393d63b6
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/pdf/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide class to facilitate the generation of PDF document.
+ */
+package org.adempiere.pdf;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/print/export/PrintDataExcelExporter.java b/org.adempiere.base/src/org/adempiere/print/export/PrintDataExcelExporter.java
index 10c7845967..ad1ad3b1cb 100644
--- a/org.adempiere.base/src/org/adempiere/print/export/PrintDataExcelExporter.java
+++ b/org.adempiere.base/src/org/adempiere/print/export/PrintDataExcelExporter.java
@@ -52,8 +52,7 @@ import org.compiere.util.Util;
*
BF [ 1974309 ] Exporting a report to XLS is not setting page format
*/
-public class PrintDataExcelExporter
-extends AbstractExcelExporter
+public class PrintDataExcelExporter extends AbstractExcelExporter
{
//constant for form rendering
private static final int COLUMN_WIDTH_DIVISOR = 64;
diff --git a/org.adempiere.base/src/org/adempiere/print/export/package-info.java b/org.adempiere.base/src/org/adempiere/print/export/package-info.java
new file mode 100644
index 0000000000..881881a0e6
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/print/export/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide implementation of print data export to excel format.
+ */
+package org.adempiere.print.export;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/process/DepositBatchClose.java b/org.adempiere.base/src/org/adempiere/process/DepositBatchClose.java
index 0e3634676e..aac080921c 100644
--- a/org.adempiere.base/src/org/adempiere/process/DepositBatchClose.java
+++ b/org.adempiere.base/src/org/adempiere/process/DepositBatchClose.java
@@ -29,17 +29,15 @@
***********************************************************************/
package org.adempiere.process;
-
import java.util.logging.*;
import org.compiere.model.*;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
/**
- * Close Deposit Batch (set processed to Y)
+ * Process to Close Deposit Batch (set processed to Y)
*
* @author Alejandro Falcone
- * @version $Id: DepositBatchClose.java,v 1.2 2007/07/03 00:51:01 afalcone Exp $
*/
@org.adempiere.base.annotation.Process
public class DepositBatchClose extends SvrProcess
diff --git a/org.adempiere.base/src/org/adempiere/process/Fill1099Extract.java b/org.adempiere.base/src/org/adempiere/process/Fill1099Extract.java
index 5939ca0b5b..2d66129ac0 100644
--- a/org.adempiere.base/src/org/adempiere/process/Fill1099Extract.java
+++ b/org.adempiere.base/src/org/adempiere/process/Fill1099Extract.java
@@ -25,9 +25,8 @@ import org.compiere.process.SvrProcess;
import org.compiere.util.*;
/**
- * Fill 1099 Extract (T_1099EXTRACT) with data from bpartner, bpartner location and invoices.
+ * Process to Fill 1099 Extract (T_1099EXTRACT) with data from bpartner, bpartner location and invoices.
* @author Carlos Ruiz
- * @version $Id: Fill1099Extract.java
*/
@org.adempiere.base.annotation.Process
public class Fill1099Extract extends SvrProcess
diff --git a/org.adempiere.base/src/org/adempiere/process/OnlineShipmentProcess.java b/org.adempiere.base/src/org/adempiere/process/OnlineShipmentProcess.java
index f7a11b6723..2a954ea309 100644
--- a/org.adempiere.base/src/org/adempiere/process/OnlineShipmentProcess.java
+++ b/org.adempiere.base/src/org/adempiere/process/OnlineShipmentProcess.java
@@ -24,7 +24,7 @@ import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
/**
- *
+ * Process to perform online shipment processing for {@link MPackage}
* @author Low Heng Sin
*
*/
diff --git a/org.adempiere.base/src/org/adempiere/process/PrintShippingLabel.java b/org.adempiere.base/src/org/adempiere/process/PrintShippingLabel.java
index d32a084a26..1357c5ec28 100644
--- a/org.adempiere.base/src/org/adempiere/process/PrintShippingLabel.java
+++ b/org.adempiere.base/src/org/adempiere/process/PrintShippingLabel.java
@@ -28,6 +28,10 @@ import org.compiere.model.MPackage;
import org.compiere.model.MShipperLabels;
import org.compiere.process.SvrProcess;
+/**
+ * Process to perform printing of shipping label that have been attached to {@link MPackage}.
+ * Uses {@link IPrintShippingLabel} service to print as image or to label printer.
+ */
@org.adempiere.base.annotation.Process
public class PrintShippingLabel extends SvrProcess
{
diff --git a/org.adempiere.base/src/org/adempiere/process/ResetLockedAccount.java b/org.adempiere.base/src/org/adempiere/process/ResetLockedAccount.java
index b1fe547ac3..8f4305ec6a 100644
--- a/org.adempiere.base/src/org/adempiere/process/ResetLockedAccount.java
+++ b/org.adempiere.base/src/org/adempiere/process/ResetLockedAccount.java
@@ -32,7 +32,7 @@ import org.compiere.util.Env;
import org.compiere.util.Msg;
/**
- * Unlock locked user account
+ * Process to unlock locked user account.
*/
@org.adempiere.base.annotation.Process
public class ResetLockedAccount extends SvrProcess {
diff --git a/org.adempiere.base/src/org/adempiere/process/ShipperCreateFrom.java b/org.adempiere.base/src/org/adempiere/process/ShipperCreateFrom.java
index a4fbdf084b..9605b62e38 100644
--- a/org.adempiere.base/src/org/adempiere/process/ShipperCreateFrom.java
+++ b/org.adempiere.base/src/org/adempiere/process/ShipperCreateFrom.java
@@ -31,7 +31,7 @@ import org.compiere.model.X_M_ShipperPickupTypesCfg;
import org.compiere.process.SvrProcess;
/**
- * Create shipper child records from M_ShipperCfg child records.
+ * Process to create shipper child records from M_ShipperCfg child records.
*/
@org.adempiere.base.annotation.Process
public class ShipperCreateFrom extends SvrProcess
diff --git a/org.adempiere.base/src/org/adempiere/process/ValidateAddressProcess.java b/org.adempiere.base/src/org/adempiere/process/ValidateAddressProcess.java
index 11f018ea6a..f51a7303ee 100644
--- a/org.adempiere.base/src/org/adempiere/process/ValidateAddressProcess.java
+++ b/org.adempiere.base/src/org/adempiere/process/ValidateAddressProcess.java
@@ -28,7 +28,7 @@ import org.compiere.util.Env;
import org.compiere.util.Msg;
/**
- * Online validate address process
+ * Process to perform online validation of an address (M_Location)
* @author Elaine
*
*/
diff --git a/org.adempiere.base/src/org/adempiere/process/ValidateTaxProviderConnection.java b/org.adempiere.base/src/org/adempiere/process/ValidateTaxProviderConnection.java
index 8af51d2069..2633199e45 100644
--- a/org.adempiere.base/src/org/adempiere/process/ValidateTaxProviderConnection.java
+++ b/org.adempiere.base/src/org/adempiere/process/ValidateTaxProviderConnection.java
@@ -23,7 +23,7 @@ import org.compiere.process.SvrProcess;
import org.compiere.util.Msg;
/**
- * Online validate tax provider connection
+ * Process to perform online validation of tax provider ({@link MTaxProvider} connection configuration.
* @author Elaine
*
*/
diff --git a/org.adempiere.base/src/org/adempiere/process/VoidShipmentProcess.java b/org.adempiere.base/src/org/adempiere/process/VoidShipmentProcess.java
index 9bcd5294ef..10aa756d81 100644
--- a/org.adempiere.base/src/org/adempiere/process/VoidShipmentProcess.java
+++ b/org.adempiere.base/src/org/adempiere/process/VoidShipmentProcess.java
@@ -25,7 +25,7 @@ import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
/**
- * Void online shipment package
+ * Process to perform online void of a shipment package ({@link MPackage}).
* @author Low Heng Sin
*
*/
diff --git a/org.adempiere.base/src/org/adempiere/process/package-info.java b/org.adempiere.base/src/org/adempiere/process/package-info.java
new file mode 100644
index 0000000000..ada4cacd3d
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/process/package-info.java
@@ -0,0 +1,28 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * One of the package that provide implementation of iDempiere core processes.
+ * @see org.compiere.process
+ * @see org.idempiere.process
+ */
+package org.adempiere.process;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/util/ContextRunnable.java b/org.adempiere.base/src/org/adempiere/util/ContextRunnable.java
index 69a64f75f5..35b765ac46 100644
--- a/org.adempiere.base/src/org/adempiere/util/ContextRunnable.java
+++ b/org.adempiere.base/src/org/adempiere/util/ContextRunnable.java
@@ -15,9 +15,17 @@ package org.adempiere.util;
import java.util.Properties;
-
/**
- * Base class to implement runnable that will execute code in session context
+ * Base class to implement runnable that will execute code in session context.
+ * Example usage:
+ *
FR [ 3020635 ] Model Generator should use FQ class names
* https://sourceforge.net/p/adempiere/feature-requests/987/
- * @author Victor Perez, e-Evolution
+ * @author Victor Perez, e-Evolution
*
FR [ 1785001 ] Using ModelPackage of EntityType to Generate Model Class
*/
public class ModelInterfaceGenerator
diff --git a/org.adempiere.base/src/org/adempiere/util/package-info.java b/org.adempiere.base/src/org/adempiere/util/package-info.java
new file mode 100644
index 0000000000..2e7a8db0e6
--- /dev/null
+++ b/org.adempiere.base/src/org/adempiere/util/package-info.java
@@ -0,0 +1,28 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide utility and helper classes.
+ * Provide server context implementation.
+ * Provide classes for generation of model and interfaces for table.
+ */
+package org.adempiere.util;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/Adempiere.java b/org.adempiere.base/src/org/compiere/Adempiere.java
index 008e9132d1..ccae1930fd 100644
--- a/org.adempiere.base/src/org/compiere/Adempiere.java
+++ b/org.adempiere.base/src/org/compiere/Adempiere.java
@@ -54,11 +54,9 @@ import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle;
/**
- * Adempiere Control Class
+ * Static methods for iDempiere startup, system info and global thread pool.
*
* @author Jorg Janke
- * @version $Id: Adempiere.java,v 1.8 2006/08/11 02:58:14 jjanke Exp $
- *
*/
public final class Adempiere
{
diff --git a/org.adempiere.base/src/org/compiere/acct/Doc.java b/org.adempiere.base/src/org/compiere/acct/Doc.java
index ef58c4a7f9..2bc7b926ce 100644
--- a/org.adempiere.base/src/org/compiere/acct/Doc.java
+++ b/org.adempiere.base/src/org/compiere/acct/Doc.java
@@ -61,7 +61,7 @@ import org.compiere.util.Trx;
import org.compiere.util.Util;
/**
- * Abstract base class for posting document.
+ * Abstract base class for posting of accounting document.
*
*
* Table Base Document Types (C_DocType.DocBaseType and AD_Reference_ID=183)
diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_AssetAddition.java b/org.adempiere.base/src/org/compiere/acct/Doc_AssetAddition.java
index c482145fe2..7c75980a0a 100644
--- a/org.adempiere.base/src/org/compiere/acct/Doc_AssetAddition.java
+++ b/org.adempiere.base/src/org/compiere/acct/Doc_AssetAddition.java
@@ -18,7 +18,6 @@ import org.compiere.model.X_C_Project_Acct;
import org.compiere.util.DB;
import org.compiere.util.Env;
-
/**
* Posting for {@link MAssetAddition} document. DOCBASETYPE_GLDocument.
* @author Teo_Sarca, SC ARHIPAC SERVICE SRL
diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_AssetDisposed.java b/org.adempiere.base/src/org/compiere/acct/Doc_AssetDisposed.java
index 2f7a5dfbba..0a0abc0146 100644
--- a/org.adempiere.base/src/org/compiere/acct/Doc_AssetDisposed.java
+++ b/org.adempiere.base/src/org/compiere/acct/Doc_AssetDisposed.java
@@ -33,7 +33,6 @@ import org.compiere.model.MAssetDisposed;
import org.compiere.model.MDocType;
import org.compiere.util.Env;
-
/**
* Posting for {@link MAssetDisposed} document. DOCBASETYPE_GLDocument.
* @author Teo_Sarca, SC ARHIPAC SERVICE SRL
diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_AssetReval.java b/org.adempiere.base/src/org/compiere/acct/Doc_AssetReval.java
index 1222bae133..5f6833343d 100644
--- a/org.adempiere.base/src/org/compiere/acct/Doc_AssetReval.java
+++ b/org.adempiere.base/src/org/compiere/acct/Doc_AssetReval.java
@@ -32,7 +32,6 @@ import org.compiere.model.MAssetReval;
import org.compiere.model.MDocType;
import org.compiere.util.Env;
-
/**
* Posting for {@link MAssetReval} document. DOCBASETYPE_GLJournal.
* @author Anca Bradau www.arhipac.ro
diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_AssetTransfer.java b/org.adempiere.base/src/org/compiere/acct/Doc_AssetTransfer.java
index 39c42f518a..ccda0e84de 100644
--- a/org.adempiere.base/src/org/compiere/acct/Doc_AssetTransfer.java
+++ b/org.adempiere.base/src/org/compiere/acct/Doc_AssetTransfer.java
@@ -11,7 +11,6 @@ import org.compiere.model.MDepreciationWorkfile;
import org.compiere.model.MDocType;
import org.compiere.util.Env;
-
/**
* Posting for {@link MAssetTransfer} document. DOCBASETYPE_GLJournal.
* @author Anca Bradau www.arhipac.ro
diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_DepreciationEntry.java b/org.adempiere.base/src/org/compiere/acct/Doc_DepreciationEntry.java
index 2c12f9b333..4979c419a3 100644
--- a/org.adempiere.base/src/org/compiere/acct/Doc_DepreciationEntry.java
+++ b/org.adempiere.base/src/org/compiere/acct/Doc_DepreciationEntry.java
@@ -11,7 +11,6 @@ import org.compiere.model.MDepreciationEntry;
import org.compiere.model.MDepreciationExp;
import org.compiere.util.Env;
-
/**
* Posting for {@link MDepreciationEntry} document.
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
diff --git a/org.adempiere.base/src/org/compiere/acct/Fact.java b/org.adempiere.base/src/org/compiere/acct/Fact.java
index ff42ef6787..1b08f0d256 100644
--- a/org.adempiere.base/src/org/compiere/acct/Fact.java
+++ b/org.adempiere.base/src/org/compiere/acct/Fact.java
@@ -34,7 +34,8 @@ import org.compiere.util.CLogger;
import org.compiere.util.Env;
/**
- * Accounting Fact
+ * Accounting Fact for {@link Doc}.
+ * Create and save one or more {@link FactLine} for an accounting document.
*
* @author Jorg Janke
* @version $Id: Fact.java,v 1.2 2006/07/30 00:53:33 jjanke Exp $
diff --git a/org.adempiere.base/src/org/compiere/acct/package-info.java b/org.adempiere.base/src/org/compiere/acct/package-info.java
new file mode 100644
index 0000000000..a1a816545a
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/acct/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide classes for posting of accounting document to the fact table ({@link org.compiere.model.MFactAcct}.
+ */
+package org.compiere.acct;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/db/package-info.java b/org.adempiere.base/src/org/compiere/db/package-info.java
new file mode 100644
index 0000000000..68c370eaea
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/db/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide interface and classes for DB integration.
+ */
+package org.compiere.db;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/db/package.html b/org.adempiere.base/src/org/compiere/db/package.html
deleted file mode 100644
index 4cbefaddaf..0000000000
--- a/org.adempiere.base/src/org/compiere/db/package.html
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-Provides for....
-
-
-
-
-
-
-
diff --git a/org.adempiere.base/src/org/compiere/db/partition/RangePartitionInterval.java b/org.adempiere.base/src/org/compiere/db/partition/RangePartitionInterval.java
index e4f1597a93..47c77ab3cd 100644
--- a/org.adempiere.base/src/org/compiere/db/partition/RangePartitionInterval.java
+++ b/org.adempiere.base/src/org/compiere/db/partition/RangePartitionInterval.java
@@ -37,6 +37,9 @@ import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.Msg;
+/**
+ * Range interval for a partition column
+ */
public class RangePartitionInterval {
private String columnName;
private String name;
diff --git a/org.adempiere.base/src/org/compiere/db/partition/package-info.java b/org.adempiere.base/src/org/compiere/db/partition/package-info.java
new file mode 100644
index 0000000000..57141025e0
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/db/partition/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide interface and classes for table partitioning support
+ */
+package org.compiere.db.partition;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/dbPort/package-info.java b/org.adempiere.base/src/org/compiere/dbPort/package-info.java
new file mode 100644
index 0000000000..5b9564f2dc
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/dbPort/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide support for conversion of Oracle SQL statements to other database dialect.
+ */
+package org.compiere.dbPort;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/dbPort/package.html b/org.adempiere.base/src/org/compiere/dbPort/package.html
deleted file mode 100644
index ac35fb16d3..0000000000
--- a/org.adempiere.base/src/org/compiere/dbPort/package.html
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-Provides for conversion of SQL commands from Oracle to other databases.
-
Package Specification
-
-
-
The Oracle Source code statements need to be delimited by "/"
-
-
-
-
-
-
diff --git a/org.adempiere.base/src/org/compiere/impexp/CopyImportFormat.java b/org.adempiere.base/src/org/compiere/impexp/CopyImportFormat.java
index b4c7fd7038..fd02759050 100644
--- a/org.adempiere.base/src/org/compiere/impexp/CopyImportFormat.java
+++ b/org.adempiere.base/src/org/compiere/impexp/CopyImportFormat.java
@@ -24,7 +24,7 @@ import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
/**
- * Copy Import Format (lines)
+ * Process to Copy Import Format (lines)
*
* @author Jorg Janke
* @version $Id: CopyImportFormat.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
diff --git a/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java b/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java
index b9edaf7d11..4390e99e90 100644
--- a/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java
+++ b/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java
@@ -35,7 +35,7 @@ import org.compiere.util.DB;
import org.compiere.util.Env;
/**
- * Import Format
+ * Import implementation using {@link MImpFormat} and {@link MImpFormatRow}.
*
* @author Jorg Janke
* @author Trifon Trifonov, Catura AG (www.catura.de)
diff --git a/org.adempiere.base/src/org/compiere/impexp/MImpFormat.java b/org.adempiere.base/src/org/compiere/impexp/MImpFormat.java
index ab300be87a..d3d20efa04 100644
--- a/org.adempiere.base/src/org/compiere/impexp/MImpFormat.java
+++ b/org.adempiere.base/src/org/compiere/impexp/MImpFormat.java
@@ -26,7 +26,7 @@ import org.compiere.model.X_AD_ImpFormat;
import org.compiere.util.DB;
/**
- * Import Format Model
+ * Extended Import Format Model for AD_ImpFormat
*
* @author Jorg Janke
* @version $Id: MImpFormat.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
diff --git a/org.adempiere.base/src/org/compiere/impexp/MImpFormatRow.java b/org.adempiere.base/src/org/compiere/impexp/MImpFormatRow.java
index 4664cc27d5..a80e6f5882 100644
--- a/org.adempiere.base/src/org/compiere/impexp/MImpFormatRow.java
+++ b/org.adempiere.base/src/org/compiere/impexp/MImpFormatRow.java
@@ -23,7 +23,7 @@ import org.compiere.model.X_AD_ImpFormat_Row;
import org.compiere.util.Util;
/**
- * Import Format Row Model
+ * Extended Import Format Row Model for AD_ImpFormat_Row
*
* @author Jorg Janke
* @version $Id: MImpFormatRow.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
diff --git a/org.adempiere.base/src/org/compiere/impexp/package-info.java b/org.adempiere.base/src/org/compiere/impexp/package-info.java
new file mode 100644
index 0000000000..5716f0d91f
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/impexp/package-info.java
@@ -0,0 +1,27 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide import implementation for AD_ImpFormat and AD_ImpFormat_Row.
+ * Provide bank statement loading and matching integration support.
+ */
+package org.compiere.impexp;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/impexp/package.html b/org.adempiere.base/src/org/compiere/impexp/package.html
deleted file mode 100644
index eaceadcaad..0000000000
--- a/org.adempiere.base/src/org/compiere/impexp/package.html
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-Provides for....
-
-
-
-
-
-
-
diff --git a/org.adempiere.base/src/org/compiere/install/package-info.java b/org.adempiere.base/src/org/compiere/install/package-info.java
new file mode 100644
index 0000000000..1ad7bfdc54
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/install/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide translation classes
+ */
+package org.compiere.install;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/model/credit/package-info.java b/org.adempiere.base/src/org/compiere/model/credit/package-info.java
new file mode 100644
index 0000000000..d6fb7a3ba3
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/model/credit/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide interface and classes for credit status management
+ */
+package org.compiere.model.credit;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/model/package-info.java b/org.adempiere.base/src/org/compiere/model/package-info.java
new file mode 100644
index 0000000000..68e8a5e07c
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/model/package-info.java
@@ -0,0 +1,28 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * This is the package that contains the majority of iDempiere's generated model class and interface.
+ * Provide majority of iDempiere's extended model class (M*).
+ * Provide interface and classes for some iDempiere core service (PO, AD Window, callout, lookup, attachment storage, image storage, background service, etc).
+ */
+package org.compiere.model;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/model/package.html b/org.adempiere.base/src/org/compiere/model/package.html
deleted file mode 100644
index 028010d019..0000000000
--- a/org.adempiere.base/src/org/compiere/model/package.html
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-Provides for....
-
-
-
-
-
-
-
diff --git a/org.adempiere.base/src/org/compiere/package-info.java b/org.adempiere.base/src/org/compiere/package-info.java
new file mode 100644
index 0000000000..a1d84fd20b
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide class for startup, system info and global thread pool.
+ */
+package org.compiere;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/package.html b/org.adempiere.base/src/org/compiere/package.html
deleted file mode 100644
index d16bf7708c..0000000000
--- a/org.adempiere.base/src/org/compiere/package.html
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-Provides System Startup and Info
-
-
-
-
-
-
-
diff --git a/org.adempiere.base/src/org/compiere/print/layout/package-info.java b/org.adempiere.base/src/org/compiere/print/layout/package-info.java
new file mode 100644
index 0000000000..cca9dbb851
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/print/layout/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide layout and element implementation for iDempiere reporting engine
+ */
+package org.compiere.print.layout;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/print/package-info.java b/org.adempiere.base/src/org/compiere/print/package-info.java
new file mode 100644
index 0000000000..01a5efcbb4
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/print/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide interface and classes for iDempiere reporting engine.
+ */
+package org.compiere.print;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/print/package.html b/org.adempiere.base/src/org/compiere/print/package.html
deleted file mode 100644
index 0419707fa0..0000000000
--- a/org.adempiere.base/src/org/compiere/print/package.html
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-Provides for....
-
-
-
-
-
-
-
diff --git a/org.adempiere.base/src/org/compiere/print/util/package-info.java b/org.adempiere.base/src/org/compiere/print/util/package-info.java
new file mode 100644
index 0000000000..17de6b6e83
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/print/util/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide utility classes for iDempiere reporting engine
+ */
+package org.compiere.print.util;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/process/package-info.java b/org.adempiere.base/src/org/compiere/process/package-info.java
new file mode 100644
index 0000000000..5fafa9ebf9
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/process/package-info.java
@@ -0,0 +1,29 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide classes and interface for iDempiere process.
+ * Provide implementation of iDempiere core processes.
+ * @see org.adempiere.process
+ * @see org.idempiere.process
+ */
+package org.compiere.process;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/process/package.html b/org.adempiere.base/src/org/compiere/process/package.html
deleted file mode 100644
index 386603d73a..0000000000
--- a/org.adempiere.base/src/org/compiere/process/package.html
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-Provides Processes used in Server and optionally Client Level.
-
Package Specification
-
-
-
Classes in this package are run either on the Server or on the Client
-
When started, at runtime it is determied if the Server is available. If
- yes, the classes are invoked via the Application Server otherwise they are
- executed locally.
-
-
-
Related Documentation
-
Steps
-
@since R2.4.1
-
-
diff --git a/org.adempiere.base/src/org/compiere/report/core/package-info.java b/org.adempiere.base/src/org/compiere/report/core/package-info.java
new file mode 100644
index 0000000000..36eb834def
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/report/core/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide data model classes for iDempiere reporting engine
+ */
+package org.compiere.report.core;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/report/package-info.java b/org.adempiere.base/src/org/compiere/report/package-info.java
new file mode 100644
index 0000000000..5281797798
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/report/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide implementation for iDempiere financial report writer
+ */
+package org.compiere.report;
diff --git a/org.adempiere.base/src/org/compiere/sla/package-info.java b/org.adempiere.base/src/org/compiere/sla/package-info.java
new file mode 100644
index 0000000000..e71eb2cc2e
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/sla/package-info.java
@@ -0,0 +1,2 @@
+@java.lang.Deprecated
+package org.compiere.sla;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/tools/package-info.java b/org.adempiere.base/src/org/compiere/tools/package-info.java
new file mode 100644
index 0000000000..6bcec7bd16
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/tools/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+ /**
+ * Provide utility classes for text file processing
+ */
+package org.compiere.tools;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/util/AdempiereSystemError.java b/org.adempiere.base/src/org/compiere/util/AdempiereSystemError.java
index 73de9e9d1d..6d8a59408d 100644
--- a/org.adempiere.base/src/org/compiere/util/AdempiereSystemError.java
+++ b/org.adempiere.base/src/org/compiere/util/AdempiereSystemError.java
@@ -18,9 +18,9 @@ package org.compiere.util;
/**
- * Adempiere System Error.
+ * iDempiere System Error.
* Error caused by invalid configurations, etc.
- * (No program error)
+ * (Not recoverable)
*
* @author Jorg Janke
* @version $Id: AdempiereSystemError.java,v 1.2 2006/07/30 00:54:36 jjanke Exp $
@@ -28,7 +28,7 @@ package org.compiere.util;
public class AdempiereSystemError extends Exception
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 9111445784263763938L;
diff --git a/org.adempiere.base/src/org/compiere/util/AdempiereUserError.java b/org.adempiere.base/src/org/compiere/util/AdempiereUserError.java
index 744b95559d..71e6100dc9 100644
--- a/org.adempiere.base/src/org/compiere/util/AdempiereUserError.java
+++ b/org.adempiere.base/src/org/compiere/util/AdempiereUserError.java
@@ -18,9 +18,8 @@ package org.compiere.util;
/**
- * Adempiere User Error.
- * Cuased by (lack of) user input/selection.
- * (No program error)
+ * iDempiere User Error.
+ * Caused by (lack of) user input/selection.
*
* @author Jorg Janke
* @version $Id: AdempiereUserError.java,v 1.2 2006/07/30 00:54:35 jjanke Exp $
diff --git a/org.adempiere.base/src/org/compiere/util/AmtInWords.java b/org.adempiere.base/src/org/compiere/util/AmtInWords.java
index 47984f664a..855ffe091a 100644
--- a/org.adempiere.base/src/org/compiere/util/AmtInWords.java
+++ b/org.adempiere.base/src/org/compiere/util/AmtInWords.java
@@ -17,7 +17,7 @@
package org.compiere.util;
/**
- * Amount in Words.
+ * Convert amount to words.
* See Msg.getAmtInWords
* @author Jorg Janke
* @version $Id: AmtInWords.java,v 1.3 2006/07/30 00:54:36 jjanke Exp $
diff --git a/org.adempiere.base/src/org/compiere/util/ByteArrayDataSource.java b/org.adempiere.base/src/org/compiere/util/ByteArrayDataSource.java
index c0021aa228..a4faab3539 100644
--- a/org.adempiere.base/src/org/compiere/util/ByteArrayDataSource.java
+++ b/org.adempiere.base/src/org/compiere/util/ByteArrayDataSource.java
@@ -27,11 +27,11 @@ import java.util.logging.Level;
import javax.activation.DataSource;
/**
- * A DataSource based on the Java Mail Example.
+ * A DataSource based on the Java Mail Example.
* This class implements a DataSource from:
- * an InputStream
- * a byte array
- * a String
+ *
an InputStream
+ *
a byte array
+ *
a String
* @author John Mani
* @author Bill Shannon
* @author Max Spivak
diff --git a/org.adempiere.base/src/org/compiere/util/CCache.java b/org.adempiere.base/src/org/compiere/util/CCache.java
index 52a6547462..436bd926d7 100644
--- a/org.adempiere.base/src/org/compiere/util/CCache.java
+++ b/org.adempiere.base/src/org/compiere/util/CCache.java
@@ -42,12 +42,14 @@ import org.idempiere.distributed.ICacheService;
public class CCache implements CacheInterface, Map, Serializable
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 4960404895430292476L;
+ /** Key:value map of cached items */
protected Map cache = null;
+ /** Set of key that has null value */
protected Set nullList = null;
private String m_tableName;
@@ -59,6 +61,10 @@ public class CCache implements CacheInterface, Map, Serializable
/** Default cache expire time in minutes **/
public static final int DEFAULT_EXPIRE_MINUTE = getDefaultExpireMinute();
+ /**
+ * Get default expire minute from system property (fallback to 60)
+ * @return default expire time in minute
+ */
private static int getDefaultExpireMinute()
{
try
@@ -79,10 +85,10 @@ public class CCache implements CacheInterface, Map, Serializable
}
/**
- * Get the max size for the cache based on a system property
- * for example -DCache.MaxSize.AD_Column=15000 will set the max size for AD_Column
+ * Get the max size for the cache based on a system property,
+ * for example -DCache.MaxSize.AD_Column=15000 will set the max size for AD_Column.
* @param name
- * @return
+ * @return max size for cache (-1 for no max size)
*/
private static int getCacheMaxSize(String name)
{
@@ -103,28 +109,50 @@ public class CCache implements CacheInterface, Map, Serializable
return -1;
}
+ /**
+ * @param name
+ * @param initialCapacity
+ */
public CCache (String name, int initialCapacity)
{
this(name, name, initialCapacity);
}
+ /**
+ * @param name
+ * @param initialCapacity
+ * @param expireMinutes
+ */
public CCache (String name, int initialCapacity, int expireMinutes)
{
this(name, initialCapacity, expireMinutes, false);
}
+ /**
+ * @param name
+ * @param initialCapacity
+ * @param expireMinutes
+ * @param distributed
+ */
public CCache (String name, int initialCapacity, int expireMinutes, boolean distributed)
{
this(name, name, initialCapacity, expireMinutes, distributed);
}
+ /**
+ * @param name
+ * @param initialCapacity
+ * @param expireMinutes
+ * @param distributed
+ * @param maxSize
+ */
public CCache (String name, int initialCapacity, int expireMinutes, boolean distributed, int maxSize)
{
this(name, name, initialCapacity, expireMinutes, distributed, maxSize);
}
/**
- * Adempiere Cache - expires after 2 hours
+ * @param tableName
* @param name (table) name of the cache
* @param initialCapacity initial capacity // ignored
*/
@@ -133,18 +161,31 @@ public class CCache implements CacheInterface, Map, Serializable
this (tableName, name, initialCapacity, false);
} // CCache
+ /**
+ * @param tableName
+ * @param name
+ * @param initialCapacity
+ * @param distributed
+ */
public CCache (String tableName, String name, int initialCapacity, boolean distributed)
{
this (tableName, name, initialCapacity, DEFAULT_EXPIRE_MINUTE, distributed);
}
+ /**
+ * @param tableName
+ * @param name
+ * @param initialCapacity
+ * @param expireMinutes
+ * @param distributed
+ */
public CCache (String tableName, String name, int initialCapacity, int expireMinutes, boolean distributed)
{
this(tableName, name, initialCapacity, expireMinutes, distributed, CacheMgt.MAX_SIZE);
}
/**
- * Adempiere Cache
+ * @param tableName
* @param name (table) name of the cache
* @param initialCapacity initial capacity // ignored
* @param expireMinutes expire after minutes (0=no expire)
@@ -201,6 +242,10 @@ public class CCache implements CacheInterface, Map, Serializable
return m_name;
} // getName
+ /**
+ * Get table name
+ * @return table name
+ */
public String getTableName()
{
return m_tableName;
@@ -317,7 +362,6 @@ public class CCache implements CacheInterface, Map, Serializable
}
m_justReset = true;
} // clear
-
/**
* @see java.util.Map#containsKey(java.lang.Object)
@@ -515,7 +559,7 @@ public class CCache implements CacheInterface, Map, Serializable
}
/**
- *
+ * Is cache distributed
* @return true if cache is distributed (using hazelcast)
*/
public boolean isDistributed() {
@@ -523,7 +567,7 @@ public class CCache implements CacheInterface, Map, Serializable
}
/**
- *
+ * Get cache hit count
* @return cache hit count
*/
public long getHit() {
@@ -531,7 +575,7 @@ public class CCache implements CacheInterface, Map, Serializable
}
/**
- *
+ * Get cache miss count
* @return cache miss count
*/
public long getMiss() {
@@ -539,7 +583,6 @@ public class CCache implements CacheInterface, Map, Serializable
}
/**
- *
* @return true if cache has expire
*/
public boolean isExpire() {
diff --git a/org.adempiere.base/src/org/compiere/util/CCachedRowSet.java b/org.adempiere.base/src/org/compiere/util/CCachedRowSet.java
index 2918a97475..18b15ef999 100644
--- a/org.adempiere.base/src/org/compiere/util/CCachedRowSet.java
+++ b/org.adempiere.base/src/org/compiere/util/CCachedRowSet.java
@@ -56,9 +56,8 @@ import javax.sql.rowset.spi.SyncProviderException;
import org.compiere.db.AdempiereDatabase;
import org.compiere.db.Database;
-
/**
- * Adempiere Cached Row Set Implementation
+ * iDempiere Cached Row Set Implementation
*
* @author Jorg Janke
* @version $Id: CCachedRowSet.java,v 1.6 2006/07/30 00:54:36 jjanke Exp $
@@ -66,11 +65,12 @@ import org.compiere.db.Database;
public class CCachedRowSet implements RowSet, Serializable, Cloneable, CachedRowSet
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -233983261449861555L;
private CachedRowSet compositeCachedRowSet;
+
/**
* Get Cached Row Set.
* Required due to Java Sun bug 393865
@@ -190,14 +190,12 @@ public class CCachedRowSet implements RowSet, Serializable, Cloneable, CachedRow
{
return getRowSet(rs, DB.getDatabase());
} // getRowSet
-
/** Private Locale Marker */
private static Locale s_loc = null;
-
-
- /**************************************************************************
- * Adempiere Cached RowSet
+
+ /**
+ * iDempiere Cached RowSet
* @throws java.sql.SQLException
*/
private CCachedRowSet() throws SQLException
@@ -207,8 +205,7 @@ public class CCachedRowSet implements RowSet, Serializable, Cloneable, CachedRow
setSyncProvider("com.sun.rowset.providers.RIOptimisticProvider");
} // CCachedRowSet
-
- /**************************************************************************
+ /**
* Test
* @param args ignored
*/
diff --git a/org.adempiere.base/src/org/compiere/util/CCallableStatement.java b/org.adempiere.base/src/org/compiere/util/CCallableStatement.java
index 29254b6f40..93a0a92651 100644
--- a/org.adempiere.base/src/org/compiere/util/CCallableStatement.java
+++ b/org.adempiere.base/src/org/compiere/util/CCallableStatement.java
@@ -18,9 +18,11 @@ package org.compiere.util;
import java.sql.CallableStatement;
+import org.compiere.db.ProxyFactory;
+
/**
- *
- * Interface to wrap CallableStatement
+ * Interface to wrap CallableStatement.
+ * This is use by {@link ProxyFactory} and developer shouldn't use this class directly.
* @author Low Heng Sin
*/
public interface CCallableStatement extends CPreparedStatement, CallableStatement
diff --git a/org.adempiere.base/src/org/compiere/util/CLogConsole.java b/org.adempiere.base/src/org/compiere/util/CLogConsole.java
index d39b968afd..8fafee4d0a 100644
--- a/org.adempiere.base/src/org/compiere/util/CLogConsole.java
+++ b/org.adempiere.base/src/org/compiere/util/CLogConsole.java
@@ -26,7 +26,7 @@ import java.util.logging.Level;
import java.util.logging.LogRecord;
/**
- * Adempiere Console Logger
+ * Handler that publish log record to the system standard output stream
* @author Jorg Janke
* @version $Id: CLogConsole.java,v 1.2 2006/07/30 00:54:35 jjanke Exp $
*/
diff --git a/org.adempiere.base/src/org/compiere/util/CLogErrorBuffer.java b/org.adempiere.base/src/org/compiere/util/CLogErrorBuffer.java
index 991403c20c..e59a15db48 100644
--- a/org.adempiere.base/src/org/compiere/util/CLogErrorBuffer.java
+++ b/org.adempiere.base/src/org/compiere/util/CLogErrorBuffer.java
@@ -28,7 +28,7 @@ import java.util.logging.LogRecord;
import org.compiere.model.MIssue;
/**
- * Client Error Buffer
+ * Handler that publish log record to the system error output stream
*
* @author Jorg Janke
* @version $Id: CLogErrorBuffer.java,v 1.3 2006/07/30 00:54:36 jjanke Exp $
@@ -63,8 +63,6 @@ public class CLogErrorBuffer extends Handler
*/
private void initialize()
{
- // System.out.println("CLogConsole.initialize");
-
// Formatting
setFormatter(CLogFormatter.get());
// Default Level
@@ -109,6 +107,7 @@ public class CLogErrorBuffer extends Handler
* @param newLevel ignored
* @throws java.lang.SecurityException
*/
+ @Override
public synchronized void setLevel (Level newLevel)
throws SecurityException
{
@@ -127,6 +126,7 @@ public class CLogErrorBuffer extends Handler
* @see java.util.logging.Handler#publish(java.util.logging.LogRecord)
* @param record log record
*/
+ @Override
public void publish (LogRecord record)
{
if (!isLoggable (record))
@@ -260,6 +260,7 @@ public class CLogErrorBuffer extends Handler
* Flush (NOP)
* @see java.util.logging.Handler#flush()
*/
+ @Override
public void flush ()
{
} // flush
@@ -269,6 +270,7 @@ public class CLogErrorBuffer extends Handler
* @see java.util.logging.Handler#close()
* @throws SecurityException
*/
+ @Override
public void close () throws SecurityException
{
Env.getCtx().remove(LOGS_KEY);
@@ -276,8 +278,7 @@ public class CLogErrorBuffer extends Handler
Env.getCtx().remove(HISTORY_KEY);
} // close
-
- /**************************************************************************
+ /**
* Get ColumnNames of Log Entries
* @param ctx context (not used)
* @return string vector
@@ -305,7 +306,6 @@ public class CLogErrorBuffer extends Handler
public Vector> getLogData (boolean errorsOnly)
{
LogRecord[] records = getRecords(errorsOnly);
- // System.out.println("getLogData - " + events.length);
Vector> rows = new Vector>(records.length);
for (int i = 0; i < records.length; i++)
@@ -432,6 +432,9 @@ public class CLogErrorBuffer extends Handler
return sb.toString();
} // getErrorInfo
+ /**
+ * Ensure environment context have been initialized with entry for log, error and history.
+ */
private void checkContext()
{
if (!Env.getCtx().containsKey(LOGS_KEY))
@@ -476,6 +479,11 @@ public class CLogErrorBuffer extends Handler
return sb.toString ();
} // toString
+ /**
+ * Get or create CLogErrorBuffer handler instance.
+ * @param create
+ * @return CLogErrorBuffer handler instance
+ */
public static CLogErrorBuffer get(boolean create) {
Handler[] handlers = CLogMgt.getHandlers();
for (Handler handler : handlers)
diff --git a/org.adempiere.base/src/org/compiere/util/CLogFile.java b/org.adempiere.base/src/org/compiere/util/CLogFile.java
index abc4473f5b..1986d7c1e0 100644
--- a/org.adempiere.base/src/org/compiere/util/CLogFile.java
+++ b/org.adempiere.base/src/org/compiere/util/CLogFile.java
@@ -26,14 +26,14 @@ import java.util.logging.LogRecord;
/**
- * idempiere Log File Handler
+ * Handler that publish log record to server log file
*
* @author Jorg Janke
* @version $Id: CLogFile.java,v 1.3 2006/07/30 00:54:35 jjanke Exp $
*/
public class CLogFile extends Handler
{
- /**************************************************************************
+ /**
* Constructor
* @param idempiereHome idempiere home
* @param createLogDir create log directory if missing
@@ -71,7 +71,6 @@ public class CLogFile extends Handler
*/
private void initialize(String idempiereHome, boolean createLogDir, boolean isClient)
{
- // System.out.println("CLogFile.initialize");
// Close Old File
if (m_writer != null)
close();
@@ -90,7 +89,6 @@ public class CLogFile extends Handler
reportError ("writer", ex, ErrorManager.OPEN_FAILURE);
m_writer = null;
}
- // System.out.println(getFileName());
// Formatting
setFormatter(CLogFormatter.get());
@@ -231,6 +229,9 @@ public class CLogFile extends Handler
initialize(m_idempiereHome, true, Ini.isClient());
} // rotateLog
+ /**
+ * Re-use previous log file (if available).
+ */
public void reopen()
{
if (m_previousFile != null && m_previousFile.exists() && m_file == null && m_writer == null)
@@ -279,6 +280,7 @@ public class CLogFile extends Handler
* @param newLevel new Level
* @throws java.lang.SecurityException
*/
+ @Override
public synchronized void setLevel (Level newLevel)
throws SecurityException
{
@@ -288,10 +290,11 @@ public class CLogFile extends Handler
} // setLevel
/**
- * Publish
+ * Publish log record
* @see java.util.logging.Handler#publish(java.util.logging.LogRecord)
* @param record log record
*/
+ @Override
public synchronized void publish (LogRecord record)
{
if (!isLoggable (record) || m_writer == null)
@@ -335,9 +338,10 @@ public class CLogFile extends Handler
} // publish
/**
- * Flush
+ * Flush output
* @see java.util.logging.Handler#flush()
*/
+ @Override
public void flush ()
{
try
@@ -352,10 +356,11 @@ public class CLogFile extends Handler
} // flush
/**
- * Close
+ * Close log file
* @see java.util.logging.Handler#close()
* @throws java.lang.SecurityException
*/
+ @Override
public synchronized void close () throws SecurityException
{
if (m_writer == null)
@@ -401,6 +406,13 @@ public class CLogFile extends Handler
return sb.toString ();
} // toString
+ /**
+ * Get or create CLogFile handler.
+ * @param create
+ * @param idempiereHome
+ * @param isClient
+ * @return CLogFile handler
+ */
public static CLogFile get(boolean create, String idempiereHome, boolean isClient) {
Handler[] handlers = CLogMgt.getHandlers();
for (Handler handler : handlers)
diff --git a/org.adempiere.base/src/org/compiere/util/CLogFilter.java b/org.adempiere.base/src/org/compiere/util/CLogFilter.java
index 8cf5177512..be5c1a2321 100644
--- a/org.adempiere.base/src/org/compiere/util/CLogFilter.java
+++ b/org.adempiere.base/src/org/compiere/util/CLogFilter.java
@@ -20,9 +20,8 @@ import java.util.logging.Filter;
import java.util.logging.Level;
import java.util.logging.LogRecord;
-
/**
- * idempiere Log Filter
+ * iDempiere Log Filter
*
* @author Jorg Janke
* @version $Id: CLogFilter.java,v 1.2 2006/07/30 00:54:36 jjanke Exp $
@@ -43,7 +42,7 @@ public class CLogFilter implements Filter
/** Singleton */
private static CLogFilter s_filter = null;
- /**************************************************************************
+ /**
* Constructor
*/
public CLogFilter ()
@@ -68,8 +67,6 @@ public class CLogFilter implements Filter
//
if (loggerName != null)
{
- // if (loggerName.toLowerCase().indexOf("focus") != -1)
- // return true;
if (loggerName.startsWith("sun.")
|| loggerName.startsWith("java.awt.")
|| loggerName.startsWith("javax.")
diff --git a/org.adempiere.base/src/org/compiere/util/CLogFormatter.java b/org.adempiere.base/src/org/compiere/util/CLogFormatter.java
index bd6a377702..b9a02aa0f0 100644
--- a/org.adempiere.base/src/org/compiere/util/CLogFormatter.java
+++ b/org.adempiere.base/src/org/compiere/util/CLogFormatter.java
@@ -27,9 +27,8 @@ import java.util.logging.LogRecord;
import org.compiere.model.SystemProperties;
-
/**
- * idempiere Log Formatter
+ * iDempiere Log Formatter
*
* @author Jorg Janke
* @version $Id: CLogFormatter.java,v 1.2 2006/07/30 00:54:36 jjanke Exp $
@@ -52,7 +51,7 @@ public class CLogFormatter extends Formatter
/** New Line */
public static String NL = System.getProperty("line.separator");
- /**************************************************************************
+ /**
* CLogFormatter
*/
private CLogFormatter()
@@ -197,7 +196,7 @@ public class CLogFormatter extends Formatter
m_shortFormat = shortFormat;
} // setFormat
- /**************************************************************************
+ /**
* Get Class Method from Log Record
* @param record record
* @return class.method
diff --git a/org.adempiere.base/src/org/compiere/util/CLogMgt.java b/org.adempiere.base/src/org/compiere/util/CLogMgt.java
index f0c4baa022..af154d0188 100644
--- a/org.adempiere.base/src/org/compiere/util/CLogMgt.java
+++ b/org.adempiere.base/src/org/compiere/util/CLogMgt.java
@@ -44,9 +44,8 @@ import org.compiere.model.MClient;
import org.idempiere.distributed.IClusterMember;
import org.idempiere.distributed.IClusterService;
-
/**
- * idempiere Log Management.
+ * Contain static methods for iDempiere Log Management.
*
* @author Jorg Janke
* @version $Id: CLogMgt.java,v 1.4 2006/07/30 00:54:36 jjanke Exp $
@@ -66,6 +65,9 @@ public class CLogMgt
}
};
+ /**
+ * Re-initialize after log configuration change.
+ */
private static synchronized void reInit() {
CLogMgt.initialize(Ini.isClient());
if (!levelMap.isEmpty()) {
@@ -80,7 +82,7 @@ public class CLogMgt
/**
* Initialize Logging
- * @param isClient client
+ * @param isClient true if running as client
*/
public static synchronized void initialize(boolean isClient)
{
@@ -107,32 +109,11 @@ public class CLogMgt
{
Logger rootLogger = getRootLogger();
- // System.out.println(rootLogger.getName() + " (" + rootLogger + ")");
Handler[] handlers = rootLogger.getHandlers();
for (int i = 0; i < handlers.length; i ++)
{
handlerNames.add(handlers[i].getClass().getName());
}
- /**
- Enumeration en = mgr.getLoggerNames();
- while (en.hasMoreElements())
- {
- Logger lll = Logger.getLogger(en.nextElement().toString());
- System.out.println(lll.getName() + " (" + lll + ")");
- // System.out.println("- level=" + lll.getLevel());
- // System.out.println("- parent=" + lll.getParent() + " - UseParentHandlers=" + lll.getUseParentHandlers());
- // System.out.println("- filter=" + lll.getFilter());
- handlers = lll.getHandlers();
- // System.out.println("- handlers=" + handlers.length);
- for (int i = 0; i < handlers.length; i ++)
- {
- System.out.println(" > " + handlers[i]);
- if (!s_handlers.contains(handlers[i]))
- s_handlers.add(handlers[i]);
- }
- // System.out.println();
- }
- /** **/
}
catch (Exception e)
{
@@ -227,7 +208,6 @@ public class CLogMgt
if (log.isLoggable(Level.CONFIG))log.log(Level.CONFIG, "Handler=" + handler);
} // addHandler
-
/**
* Set Formatter for all handlers
* @param formatter formatter
@@ -259,7 +239,7 @@ public class CLogMgt
} // setFilter
/**
- * Set Level for all Loggers
+ * Set Level for loggers
* @param level log level
* @param loggerNamePart optional partial class/logger name
*/
@@ -291,7 +271,8 @@ public class CLogMgt
}
/**
- * Set Level for all handlers
+ * Set Level for handlers
+ * @param loggerName optional partial logger name filter
* @param level log level
*/
public static synchronized void setLevel (String loggerName, Level level)
@@ -359,6 +340,11 @@ public class CLogMgt
setLevel(null, levelString);
} // setLevel
+ /**
+ * Set level for loggers
+ * @param loggerName optional partial logger name filter
+ * @param levelString string representation of level
+ */
public static void setLevel(String loggerName, String levelString)
{
if (levelString == null)
@@ -388,8 +374,8 @@ public class CLogMgt
} // setJDBCDebug
/**
- * Get logging Level of handlers
- * @return logging level
+ * Get logging Level of root logger
+ * @return logging level of root logger
*/
public static Level getLevel()
{
@@ -398,8 +384,8 @@ public class CLogMgt
} // getLevel
/**
- * Get logging Level of handlers
- * @return logging level
+ * Get logging Level of root logger
+ * @return logging level or root logger
*/
public static int getLevelAsInt()
{
@@ -420,8 +406,8 @@ public class CLogMgt
} // isLevel
/**
- * Is Logging Level FINEST logged
- * @return true if it is logged
+ * Is Logging Level ALL logged
+ * @return true if level ALL is logged
*/
public static boolean isLevelAll ()
{
@@ -430,7 +416,7 @@ public class CLogMgt
/**
* Is Logging Level FINEST logged
- * @return true if it is logged
+ * @return true if level FINEST is logged
*/
public static boolean isLevelFinest ()
{
@@ -439,7 +425,7 @@ public class CLogMgt
/**
* Is Logging Level FINER logged
- * @return true if it is logged
+ * @return true if level FINER is logged
*/
public static boolean isLevelFiner ()
{
@@ -448,7 +434,7 @@ public class CLogMgt
/**
* Is Logging Level FINE logged
- * @return true if it is logged
+ * @return true if level FINE is logged
*/
public static boolean isLevelFine ()
{
@@ -457,7 +443,7 @@ public class CLogMgt
/**
* Is Logging Level INFO logged
- * @return true if it is logged
+ * @return true if level INFO is logged
*/
public static boolean isLevelInfo ()
{
@@ -480,8 +466,6 @@ public class CLogMgt
}
} // enable
-
-
/**
* Shutdown Logging system
*/
@@ -491,7 +475,6 @@ public class CLogMgt
mgr.reset();
} // shutdown
-
/**
* Print Properties
*
@@ -524,9 +507,8 @@ public class CLogMgt
}
} // printProperties
-
/**
- * Get Adempiere System Info
+ * Get iDempiere System Info
* @param sb buffer to append or null
* @return Info as multiple Line String
*/
@@ -597,6 +579,11 @@ public class CLogMgt
return sb;
} // getInfo
+ /**
+ * Format amount as M or K texts
+ * @param amount
+ * @return formatted text
+ */
private static String formatMemoryInfo(long amount)
{
String unit = "";
@@ -662,7 +649,6 @@ public class CLogMgt
return sb;
} // getInfoDetail
-
/**
* Get translated Message, if DB connection exists
* @param msg AD_Message
@@ -675,7 +661,6 @@ public class CLogMgt
return msg;
} // getMsg
-
/**
* Get Server Info.
* @return host : port (NotActive) via CMhost : port
@@ -719,8 +704,8 @@ public class CLogMgt
} // getDatabaseInfo
/**
- * Get Localhost
- * @return local host
+ * Get Localhost address
+ * @return local host address
*/
private static String getLocalHost()
{
@@ -752,61 +737,11 @@ public class CLogMgt
return rootLogger;
}
- /**************************************************************************
+ /**
* CLogMgt
*/
public CLogMgt ()
{
- testLog();
}
- /**
- * Test Log
- */
- private void testLog()
- {
- final CLogger log1 = CLogger.getCLogger("test");
- //
- log1.log(Level.SEVERE, "severe");
- log1.warning("warning");
- log1.info("Info");
- log1.config("config");
- log1.fine("fine");
- log1.finer("finer");
- log1.entering("myClass", "myMethod", "parameter");
- log1.exiting("myClass", "myMethod", "result");
- log1.finest("finest");
-
- new Thread()
- {
- public void run()
- {
- log1.info("thread info");
- }
- }.start();
-
- try
- {
- Integer.parseInt("ABC");
- }
- catch (Exception e)
- {
- log1.log(Level.SEVERE, "error message", e);
- }
- if (log1.isLoggable(Level.INFO)){
- log1.log(Level.INFO, "info message 1", "1Param");
- log1.log(Level.INFO, "info message n", new Object[]{"1Param","2Param"});
- }
- } // testLog
-
- /**
- * Test
- * @param args ignored
- */
- public static void main (String[] args)
- {
- initialize(true);
- new CLogMgt();
- } // CLogMgt
-
} // CLogMgt
diff --git a/org.adempiere.base/src/org/compiere/util/CLogger.java b/org.adempiere.base/src/org/compiere/util/CLogger.java
index 74bccd0998..017a3e3b32 100644
--- a/org.adempiere.base/src/org/compiere/util/CLogger.java
+++ b/org.adempiere.base/src/org/compiere/util/CLogger.java
@@ -19,9 +19,8 @@ package org.compiere.util;
import java.util.logging.LogManager;
import java.util.logging.Logger;
-
/**
- * idempiere Logger
+ * iDempiere Logger
*
* @author Jorg Janke
* @version $Id: CLogger.java,v 1.3 2006/08/09 16:38:47 jjanke Exp $
@@ -33,7 +32,6 @@ public class CLogger extends Logger
private static final String LAST_ERROR = "org.compiere.util.CLogger.lastError";
private static final String LAST_EXCEPTION = "org.compiere.util.CLogger.lastException";
-
/**
* Get Logger
* @param className class name
@@ -52,7 +50,6 @@ public class CLogger extends Logger
*/
public static synchronized CLogger getCLogger (String className, boolean usePackageLevel)
{
- // CLogMgt.initialize();
LogManager manager = LogManager.getLogManager();
if (className == null || className.trim().length() == 0)
className = "";
@@ -99,8 +96,7 @@ public class CLogger extends Logger
} // getLogger
/**
- * Get default idempiere Logger.
- * Need to be used in serialized objects
+ * Get default iDempiere Logger.
* @return logger
*/
public static CLogger get()
@@ -113,8 +109,7 @@ public class CLogger extends Logger
/** Default Logger */
private volatile static CLogger s_logger = null;
-
- /**************************************************************************
+ /**
* Standard constructor
* @param name logger name
* @param resourceBundleName optional resource bundle (ignored)
@@ -125,9 +120,6 @@ public class CLogger extends Logger
// setLevel(Level.ALL);
} // CLogger
-
- /*************************************************************************/
-
/**
* Set and issue Error and save as ValueNamePair
* @param AD_Message message key
@@ -140,7 +132,7 @@ public class CLogger extends Logger
} // saveError
/**
- * Set and issue Error and save as ValueNamePair
+ * Set and issue Error and save into context as ValueNamePair (LAST_EXCEPTION)
* @param AD_Message message key
* @param ex exception
* @return true (to avoid removal of method)
@@ -165,7 +157,9 @@ public class CLogger extends Logger
} // saveError
/**
- * Set and issue Error and save as ValueNamePair
+ * Save exception as environment context's last exception.
+ * Create ValueNamePair(AD_Message, message) and save into environment context as last error.
+ * Issue/publish AD_Message and message as severe log message
* @param AD_Message message key
* @param message
* @param ex exception
@@ -178,7 +172,9 @@ public class CLogger extends Logger
} // saveError
/**
- * Set and issue (if specified) Error and save as ValueNamePair
+ * Save exception as environment context's last exception.
+ * Create ValueNamePair(AD_Message, message) and save into environment context as last error.
+ * Issue/publish AD_Message and message as severe log message if issueError is true.
* @param AD_Message message key
* @param message
* @param ex exception
@@ -192,7 +188,8 @@ public class CLogger extends Logger
} // saveError
/**
- * Set Error and save as ValueNamePair
+ * Create ValueNamePair(AD_Message, message) and save into environment context as last error.
+ * Issue/publish AD_Message and message as severe log message if issueError is true.
* @param AD_Message message key
* @param message clear text message
* @param issueError print error message (default true)
@@ -209,7 +206,7 @@ public class CLogger extends Logger
} // saveError
/**
- * Get Error from Stack
+ * Get and remove last error from environment context
* @return AD_Message as Value and Message as String
*/
public static ValueNamePair retrieveError()
@@ -219,7 +216,7 @@ public class CLogger extends Logger
} // retrieveError
/**
- * Peek Error from Stack
+ * Get last error from environment context
* @return AD_Message as Value and Message as String
*/
public static ValueNamePair peekError()
@@ -229,9 +226,9 @@ public class CLogger extends Logger
} // peekError
/**
- * Get Error message from stack
+ * Get and remove last error message from environment context.
* @param defaultMsg default message (used when there are no errors on stack)
- * @return error message, or defaultMsg if there is not error message saved
+ * @return error message, or defaultMsg if there is no error message saved
* @see #retrieveError()
* author Teo Sarca, SC ARHIPAC SERVICE SRL
*/
@@ -243,7 +240,7 @@ public class CLogger extends Logger
}
/**
- * Get Error from Stack
+ * Get and remove last exception from environment context.
* @return last exception
*/
public static Exception retrieveException()
@@ -253,7 +250,7 @@ public class CLogger extends Logger
} // retrieveError
/**
- * Peek Exception from Stack
+ * Get last exception from environment context.
* @return last exception
*/
public static Exception peekException()
@@ -263,7 +260,8 @@ public class CLogger extends Logger
} // peekException
/**
- * Save Warning as ValueNamePair.
+ * Create ValueNamePair(AD_Message, message) and save into environment context as last warning.
+ * Issue/publish AD_Message and message as warning log message
* @param AD_Message message key
* @param message clear text message
* @return true
@@ -279,7 +277,7 @@ public class CLogger extends Logger
} // saveWarning
/**
- * Get Warning message from stack
+ * Get and remove last Warning message from environment context.
* @param defaultMsg default message (used when there are no warnings on stack)
* @return error message, or defaultMsg if there is not error message saved
* @see #retrieveError()
@@ -292,7 +290,7 @@ public class CLogger extends Logger
}
/**
- * Get Warning from Stack
+ * Get and remove last Warning from environment context
* @return AD_Message as Value and Message as String
*/
public static ValueNamePair retrieveWarning()
@@ -302,21 +300,21 @@ public class CLogger extends Logger
} // retrieveWarning
/**
- * Save Info as ValueNamePair
+ * Create ValueNamePair(AD_Message, message) and save into environment context as last info.
+ * Issue/publish AD_Message and message as info log message
* @param AD_Message message key
* @param message clear text message
* @return true
*/
public boolean saveInfo (String AD_Message, String message)
{
-// s_lastInfo = new ValueNamePair (AD_Message, message);
ValueNamePair lastInfo = new ValueNamePair (AD_Message, message);
Env.getCtx().put(LAST_INFO, lastInfo);
return true;
} // saveInfo
/**
- * Get Info from Stack
+ * Get and remove last Info from environment context
* @return AD_Message as Value and Message as String
*/
public static ValueNamePair retrieveInfo()
@@ -326,7 +324,7 @@ public class CLogger extends Logger
} // retrieveInfo
/**
- * Reset Saved Messages/Errors/Info
+ * Remove last Saved Messages/Errors/Info from environment context
*/
public static void resetLast()
{
@@ -362,37 +360,5 @@ public class CLogger extends Logger
.append (",Level=").append (getLevel()).append ("]");
return sb.toString ();
} // toString
-
- /**
- * Write Object - Serialization
- * @param out out
- * @throws IOException
- *
- private void writeObject (ObjectOutputStream out) throws IOException
- {
- out.writeObject(getName());
- System.out.println("====writeObject:" + getName());
- } // writeObject
-
- private String m_className = null;
-
- private void readObject (ObjectInputStream in) throws IOException
- {
- try
- {
- m_className = (String)in.readObject();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- System.out.println("====readObject:" + m_className);
- }
-
- protected Object readResolve() throws ObjectStreamException
- {
- System.out.println("====readResolve:" + m_className);
- return getLogger(m_className);
- }
- /** **/
+
} // CLogger
diff --git a/org.adempiere.base/src/org/compiere/util/CPreparedStatement.java b/org.adempiere.base/src/org/compiere/util/CPreparedStatement.java
index 1838ab3885..df75f2b5cd 100644
--- a/org.adempiere.base/src/org/compiere/util/CPreparedStatement.java
+++ b/org.adempiere.base/src/org/compiere/util/CPreparedStatement.java
@@ -18,10 +18,13 @@ package org.compiere.util;
import java.sql.PreparedStatement;
+import org.compiere.db.ProxyFactory;
+
/**
- * Interface to wrap PreparedStatement
+ * Interface to wrap PreparedStatement.
+ * This is use by {@link ProxyFactory} and developer shouldn't use this class directly.
* @author Low Heng Sin
- *
+ * @see ProxyFactory
*/
public interface CPreparedStatement extends CStatement, PreparedStatement
{
diff --git a/org.adempiere.base/src/org/compiere/util/CStatement.java b/org.adempiere.base/src/org/compiere/util/CStatement.java
index 2fce529ded..915e33464e 100644
--- a/org.adempiere.base/src/org/compiere/util/CStatement.java
+++ b/org.adempiere.base/src/org/compiere/util/CStatement.java
@@ -21,10 +21,13 @@ import java.sql.Statement;
import javax.sql.RowSet;
+import org.compiere.db.ProxyFactory;
+
/**
- * Interface to wrap and extend Statement
+ * Interface to wrap and extend Statement.
+ * This is use by {@link ProxyFactory} and developer shouldn't use this class directly.
* @author Low Heng Sin
- *
+ * @see ProxyFactory
*/
public interface CStatement extends Statement
{
@@ -34,7 +37,6 @@ public interface CStatement extends Statement
*/
public String getSql();
-
/**
* Execute Query
* @return ResultSet or RowSet
@@ -47,6 +49,7 @@ public interface CStatement extends Statement
* @return boolean
* @throws SQLException
*/
+ @Override
public boolean isClosed() throws SQLException;
/**
diff --git a/org.adempiere.base/src/org/compiere/util/CStatementVO.java b/org.adempiere.base/src/org/compiere/util/CStatementVO.java
index 73886b913e..4d71eb30f0 100644
--- a/org.adempiere.base/src/org/compiere/util/CStatementVO.java
+++ b/org.adempiere.base/src/org/compiere/util/CStatementVO.java
@@ -18,11 +18,18 @@ package org.compiere.util;
import java.io.Serializable;
+import org.compiere.db.CallableStatementProxy;
+import org.compiere.db.PreparedStatementProxy;
+import org.compiere.db.StatementProxy;
+
/**
- * Adempiere Statement Value Object
+ * Statement Value Object for statement proxy.
*
* @author Jorg Janke
* @version $Id: CStatementVO.java,v 1.2 2006/07/30 00:54:35 jjanke Exp $
+ * @see StatementProxy
+ * @see PreparedStatementProxy
+ * @see CallableStatementProxy
*/
public class CStatementVO implements Serializable
{
diff --git a/org.adempiere.base/src/org/compiere/util/CacheChangeListener.java b/org.adempiere.base/src/org/compiere/util/CacheChangeListener.java
index d680246950..de0b318c9e 100644
--- a/org.adempiere.base/src/org/compiere/util/CacheChangeListener.java
+++ b/org.adempiere.base/src/org/compiere/util/CacheChangeListener.java
@@ -25,7 +25,7 @@
package org.compiere.util;
/**
- * Listener for cache reset event.
+ * Listener for cache reset event.
* Note that this is ignore by CacheMgt if CCache implementation that implement this interface
* doesn't return null for getTableName().
* @author hengsin
diff --git a/org.adempiere.base/src/org/compiere/util/CacheInfo.java b/org.adempiere.base/src/org/compiere/util/CacheInfo.java
index 5c2886c6f3..0d841f6f50 100644
--- a/org.adempiere.base/src/org/compiere/util/CacheInfo.java
+++ b/org.adempiere.base/src/org/compiere/util/CacheInfo.java
@@ -42,8 +42,8 @@ import org.idempiere.distributed.IClusterMember;
import org.idempiere.distributed.IClusterService;
/**
+ * Info value object for a register cache
* @author hengsin
- *
*/
public class CacheInfo implements Serializable {
@@ -64,7 +64,7 @@ public class CacheInfo implements Serializable {
private long miss;
/**
- *
+ * @param cache
*/
public CacheInfo(CCache, ?> cache) {
name = cache.getName();
@@ -78,6 +78,7 @@ public class CacheInfo implements Serializable {
}
/**
+ * Get register name of cache
* @return the name
*/
public String getName() {
@@ -85,6 +86,7 @@ public class CacheInfo implements Serializable {
}
/**
+ * Get optional table name
* @return the tableName
*/
public String getTableName() {
@@ -92,6 +94,7 @@ public class CacheInfo implements Serializable {
}
/**
+ * Get number of entries in cache
* @return the size
*/
public int getSize() {
@@ -99,6 +102,7 @@ public class CacheInfo implements Serializable {
}
/**
+ * Get expire of individual entry in minutes (<= 0 for no expire)
* @return the expireMinutes
*/
public int getExpireMinutes() {
@@ -106,6 +110,7 @@ public class CacheInfo implements Serializable {
}
/**
+ * Get maximum number of cached items
* @return the maxSize
*/
public int getMaxSize() {
@@ -113,6 +118,7 @@ public class CacheInfo implements Serializable {
}
/**
+ * Is cache support distribution to multiple iDempiere node
* @return the distributed
*/
public boolean isDistributed() {
@@ -121,6 +127,7 @@ public class CacheInfo implements Serializable {
/**
+ * Get address of this server node
* @return the nodeAddress
*/
public InetAddress getNodeAddress() {
@@ -128,6 +135,7 @@ public class CacheInfo implements Serializable {
}
/**
+ * Get id of this server node
* @return the nodeId
*/
public String getNodeId() {
@@ -135,7 +143,7 @@ public class CacheInfo implements Serializable {
}
/**
- *
+ * Get cache hit count
* @return hit count
*/
public long getHit() {
@@ -143,7 +151,7 @@ public class CacheInfo implements Serializable {
}
/**
- *
+ * Get cache miss count
* @return miss count
*/
public long getMiss() {
@@ -151,7 +159,7 @@ public class CacheInfo implements Serializable {
}
/**
- *
+ * Get info for all register cache
* @param sortByName
* @return cache infos
*/
@@ -203,10 +211,16 @@ public class CacheInfo implements Serializable {
}
}
+ /**
+ * @param address node address
+ */
private void setNodeAddress(InetAddress address) {
nodeAddress = address;
}
+ /**
+ * @param id node id
+ */
private void setNodeId(String id) {
nodeId = id;
}
diff --git a/org.adempiere.base/src/org/compiere/util/CacheInterface.java b/org.adempiere.base/src/org/compiere/util/CacheInterface.java
index badb324342..9313832376 100644
--- a/org.adempiere.base/src/org/compiere/util/CacheInterface.java
+++ b/org.adempiere.base/src/org/compiere/util/CacheInterface.java
@@ -17,7 +17,7 @@
package org.compiere.util;
/**
- * Adempiere Cache Interface
+ * iDempiere Cache interaction Interface
*
* @author Jorg Janke
* @version $Id: CacheInterface.java,v 1.2 2006/07/30 00:54:35 jjanke Exp $
diff --git a/org.adempiere.base/src/org/compiere/util/CacheMgt.java b/org.adempiere.base/src/org/compiere/util/CacheMgt.java
index 20f1060140..1fedf95914 100644
--- a/org.adempiere.base/src/org/compiere/util/CacheMgt.java
+++ b/org.adempiere.base/src/org/compiere/util/CacheMgt.java
@@ -35,7 +35,7 @@ import org.idempiere.distributed.IClusterMember;
import org.idempiere.distributed.IClusterService;
/**
- * Adempiere Cache Management
+ * iDempiere global Cache Manager
*
* @author Jorg Janke
* @version $Id: CacheMgt.java,v 1.2 2006/07/30 00:54:35 jjanke Exp $
@@ -43,7 +43,7 @@ import org.idempiere.distributed.IClusterService;
public class CacheMgt
{
/**
- * Get Cache Management
+ * Get global Cache Manager
* @return Cache Manager
*/
public static synchronized CacheMgt get()
@@ -96,11 +96,12 @@ public class CacheMgt
} catch (Throwable t) {}
}
- /**************************************************************************
- * Create Cache Instance
+ /**
+ * Register new CCache Instance.
+ * This is use by {@link CCache} and developer usually shouldn't use this class directly.
* @param instance Cache
* @param distributed
- * @return true if added
+ * @return map for CCache
*/
public synchronized Map register (CCache instance, boolean distributed)
{
diff --git a/org.adempiere.base/src/org/compiere/util/CacheNewRecordCallable.java b/org.adempiere.base/src/org/compiere/util/CacheNewRecordCallable.java
index 3cee5e8d44..e2d30c51d0 100644
--- a/org.adempiere.base/src/org/compiere/util/CacheNewRecordCallable.java
+++ b/org.adempiere.base/src/org/compiere/util/CacheNewRecordCallable.java
@@ -17,9 +17,8 @@ import java.io.Serializable;
import java.util.concurrent.Callable;
/**
- *
+ * Callable to support distributed cache management
* @author hengsin
- *
*/
public class CacheNewRecordCallable implements Callable, Serializable
{
diff --git a/org.adempiere.base/src/org/compiere/util/CallableResult.java b/org.adempiere.base/src/org/compiere/util/CallableResult.java
index c28b43ad3c..f4f7109307 100644
--- a/org.adempiere.base/src/org/compiere/util/CallableResult.java
+++ b/org.adempiere.base/src/org/compiere/util/CallableResult.java
@@ -2,6 +2,7 @@ package org.compiere.util;
import java.util.Map;
+@Deprecated(forRemoval = true, since = "11")
public class CallableResult extends ExecuteResult {
/**
diff --git a/org.adempiere.base/src/org/compiere/util/ContextProvider.java b/org.adempiere.base/src/org/compiere/util/ContextProvider.java
index 752067b0a6..dd1761378f 100644
--- a/org.adempiere.base/src/org/compiere/util/ContextProvider.java
+++ b/org.adempiere.base/src/org/compiere/util/ContextProvider.java
@@ -19,14 +19,21 @@ package org.compiere.util;
import java.util.Properties;
/**
- *
+ * Interface for iDempiere environment context provider
* @author Low Heng Sin
- *
*/
public interface ContextProvider {
+ /**
+ * Get context reference
+ * @return environment context reference
+ */
public Properties getContext();
+ /**
+ * Display URL at client
+ * @param url
+ */
public void showURL(String url);
}
diff --git a/org.adempiere.base/src/org/compiere/util/DB.java b/org.adempiere.base/src/org/compiere/util/DB.java
index 5f4f90ecc4..54426992f8 100644
--- a/org.adempiere.base/src/org/compiere/util/DB.java
+++ b/org.adempiere.base/src/org/compiere/util/DB.java
@@ -61,17 +61,17 @@ import org.compiere.process.ProcessInfo;
import org.compiere.process.ProcessInfoParameter;
/**
- * General Database Interface
+ * Static methods for JDBC interface
*
* @author Jorg Janke
* @version $Id: DB.java,v 1.8 2006/10/09 00:22:29 jjanke Exp $
* ---
- * @author Ashley Ramdass (Posterita)
+ * @author Ashley Ramdass (Posterita)
*
Modifications: removed static references to database connection and instead always
* get a new connection from database pool manager which manages all connections
* set rw/ro properties for the connection accordingly.
*
- * @author Teo Sarca, SC ARHIPAC SERVICE SRL
+ * @author Teo Sarca, SC ARHIPAC SERVICE SRL
*
BF [ 1647864 ] WAN: delete record error
*
FR [ 1884435 ] Add more DB.getSQLValue helper methods
*
BF [ 2873324 ] DB.TO_NUMBER should be a static method
* https://sourceforge.net/p/adempiere/bugs/2160/
*
FR [ 2873891 ] DB.getKeyNamePairs should use trxName
@@ -98,18 +98,18 @@ public final class DB
private static CConnection s_cc = null;
/** Logger */
private static CLogger log = CLogger.getCLogger (DB.class);
-
+ /** Lock object for mutual access to {@link #s_cc} */
private static Object s_ccLock = new Object();
/** SQL Statement Separator "; " */
public static final String SQLSTATEMENT_SEPARATOR = "; ";
-
- /**************************************************************************
+ /**
* Check need for post Upgrade
* @param ctx context
* @return true if post upgrade ran - false if there was no need
*/
+ @Deprecated(forRemoval = true, since = "11")
public static boolean afterMigration (Properties ctx)
{
// UPDATE AD_System SET IsJustMigrated='Y'
@@ -253,9 +253,9 @@ public final class DB
} // updateMail
- /**************************************************************************
- * Set connection
- * @param cc connection
+ /**
+ * Set active connection profile
+ * @param cc connection profile
*/
public synchronized static void setDBTarget (CConnection cc)
{
@@ -281,6 +281,7 @@ public final class DB
* Connect to database and initialise all connections.
* @return True if success, false otherwise
*/
+ @Deprecated
public static boolean connect() {
//direct connection
boolean success =false;
@@ -314,7 +315,7 @@ public final class DB
//bug [1637432]
if (s_cc == null) return false;
- //direct connection
+ //get connection
boolean success = false;
try
{
@@ -357,7 +358,7 @@ public final class DB
}
/**
- * Get auto or not auto commit connection from connection pool.
+ * Get auto or not auto commit connection from connection pool.
* Usually you should use @{@link #getConnection()} instead to get auto commit connection
* and use {@link Trx} to works with not autoCommit connection.
* @param autoCommit
@@ -436,8 +437,8 @@ public final class DB
} // getReportingConnectionRO
/**
- * Create new Connection.
- * The connection must be closed explicitly by the application
+ * Create new Connection.
+ * The connection must be closed explicitly by the application.
*
* @param autoCommit auto commit
* @param trxLevel - Connection.TRANSACTION_READ_UNCOMMITTED, Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_REPEATABLE_READ, or Connection.TRANSACTION_READ_COMMITTED.
@@ -483,9 +484,9 @@ public final class DB
} // createConnection
/**
- * Get Database Driver.
+ * Get Database Adapter.
* Access to database specific functionality.
- * @return Adempiere Database Driver
+ * @return iDempiere Database Adapter
*/
public static AdempiereDatabase getDatabase()
{
@@ -496,10 +497,10 @@ public final class DB
} // getDatabase
/**
- * Get Database Driver.
+ * Get Database Adapter.
* Access to database specific functionality.
* @param URL JDBC connection url
- * @return Adempiere Database Driver
+ * @return iDempiere Database Adapter
*/
public static AdempiereDatabase getDatabase(String URL)
{
@@ -518,9 +519,8 @@ public final class DB
return false;
} // isOracle
- //begin vpj-cd e-evolution 02/07/2005 PostgreSQL
/**
- * Do we have a Postgre DB ?
+ * Do we have a PostgreSQL DB ?
* @return true if connected to PostgreSQL
*/
public static boolean isPostgreSQL()
@@ -530,7 +530,6 @@ public final class DB
log.severe("No Database");
return false;
} // isPostgreSQL
- //begin vpj-cd e-evolution 02/07/2005 PostgreSQL
/**
* Get Database Info
@@ -543,8 +542,7 @@ public final class DB
return "No Database";
} // getDatabaseInfo
-
- /**************************************************************************
+ /**
* Check database Version with Code version
* @param ctx context
* @return true if Database version (date) is the same
@@ -589,8 +587,7 @@ public final class DB
return false;
} // isDatabaseOK
-
- /**************************************************************************
+ /**
* Check Build Version of Database against running client
* @param ctx context
* @return true if Database version (date) is the same
@@ -645,9 +642,8 @@ public final class DB
return false;
} // isDatabaseOK
-
- /**************************************************************************
- * Close Target
+ /**
+ * Close DB connection profile
*/
public static void closeTarget()
{
@@ -665,8 +661,8 @@ public final class DB
log.fine("closed");
} // closeTarget
- /**************************************************************************
- * Prepare Forward Read Only Call
+ /**
+ * Create callable statement proxy
* @param sql
* @return Callable Statement
*/
@@ -675,8 +671,8 @@ public final class DB
return prepareCall(sql, ResultSet.CONCUR_UPDATABLE, null);
}
- /**************************************************************************
- * Prepare Call
+ /**
+ * Create callable statement proxy
* @param SQL
* @param resultSetConcurrency
* @param trxName
@@ -690,8 +686,7 @@ public final class DB
trxName);
} // prepareCall
-
- /**************************************************************************
+ /**
* Prepare Statement
* @param sql
* @return Prepared Statement
@@ -703,7 +698,7 @@ public final class DB
} // prepareStatement
/**
- * Prepare Statement
+ * Create prepare Statement proxy
* @param sql
* @param trxName transaction
* @return Prepared Statement
@@ -714,7 +709,7 @@ public final class DB
} // prepareStatement
/**
- * Prepare Statement
+ * Create prepare Statement proxy
* @param connection
* @param sql
* @return Prepared Statement
@@ -739,7 +734,7 @@ public final class DB
} // prepareStatement
/**
- * Prepare Statement.
+ * Create prepare Statement proxy
* @param sql
* @param resultSetType - ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.TYPE_SCROLL_SENSITIVE
* @param resultSetConcurrency - ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
@@ -756,7 +751,7 @@ public final class DB
} // prepareStatement
/**
- * Prepare Statement.
+ * Create prepare Statement proxy
* @param connection
* @param sql sql statement
* @param resultSetType - ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.TYPE_SCROLL_SENSITIVE
@@ -773,7 +768,7 @@ public final class DB
} // prepareStatement
/**
- * Create Read Only Statement
+ * Create Statement proxy
* @return Statement
*/
public static Statement createStatement()
@@ -782,7 +777,7 @@ public final class DB
} // createStatement
/**
- * Create Statement.
+ * Create Statement Proxy.
* @param resultSetType - ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.TYPE_SCROLL_SENSITIVE
* @param resultSetConcurrency - ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
* @param trxName transaction name
@@ -829,7 +824,6 @@ public final class DB
}
}
-
/**
* Set PreparedStatement's parameter.
* Similar with calling pstmt.setObject(index, param)
@@ -877,7 +871,8 @@ public final class DB
/**
* Execute Update.
- * saves "DBExecuteError" in Log
+ * Saves "DBExecuteError" in Log.
+ * Developer is recommended to call {@link #executeUpdateEx(String, String)} instead.
* @param sql
* @param trxName optional transaction name
* @return number of rows updated or -1 if error
@@ -889,7 +884,8 @@ public final class DB
/**
* Execute Update.
- * saves "DBExecuteError" in Log
+ * Saves "DBExecuteError" in Log.
+ * Developer is recommended to call {@link #executeUpdateEx(String, String, int)} instead.
* @param sql
* @param trxName optional transaction name
* @param timeOut optional timeout parameter
@@ -915,7 +911,8 @@ public final class DB
/**
* Execute Update.
- * saves "DBExecuteError" in Log
+ * Saves "DBExecuteError" in Log.
+ * Developer is recommended to call {@link #executeUpdateEx(String, String)} instead.
* @param sql
* @param ignoreError if true, no execution error is reported
* @param trxName transaction
@@ -928,7 +925,8 @@ public final class DB
/**
* Execute Update.
- * saves "DBExecuteError" in Log
+ * Saves "DBExecuteError" in Log.
+ * Developer is recommended to call {@link #executeUpdateEx(String, String, int)} instead.
* @param sql
* @param ignoreError if true, no execution error is reported
* @param trxName transaction
@@ -942,7 +940,8 @@ public final class DB
/**
* Execute Update.
- * saves "DBExecuteError" in Log
+ * Saves "DBExecuteError" in Log.
+ * Developer is recommended to call {@link #executeUpdateEx(String, Object[], String)} instead.
* @param sql
* @param param int param
* @param trxName transaction
@@ -955,7 +954,8 @@ public final class DB
/**
* Execute Update.
- * saves "DBExecuteError" in Log
+ * Saves "DBExecuteError" in Log.
+ * Developer is recommended to call {@link #executeUpdateEx(String, Object[], String, int)} instead.
* @param sql
* @param param int param
* @param trxName transaction
@@ -969,7 +969,8 @@ public final class DB
/**
* Execute Update.
- * saves "DBExecuteError" in Log
+ * Saves "DBExecuteError" in Log.
+ * Developer is recommended to call {@link #executeUpdateEx(String, Object[], String)} instead.
* @param sql
* @param param int parameter
* @param ignoreError if true, no execution error is reported
@@ -983,7 +984,8 @@ public final class DB
/**
* Execute Update.
- * saves "DBExecuteError" in Log
+ * Saves "DBExecuteError" in Log.
+ * Developer is recommended to call {@link #executeUpdateEx(String, Object[], String, int)} instead.
* @param sql
* @param param int parameter
* @param ignoreError if true, no execution error is reported
@@ -998,7 +1000,8 @@ public final class DB
/**
* Execute Update.
- * saves "DBExecuteError" in Log
+ * Saves "DBExecuteError" in Log.
+ * Developer is recommended to call {@link #executeUpdateEx(String, Object[], String)} instead.
* @param sql
* @param params array of parameters
* @param ignoreError if true, no execution error is reported
@@ -1012,7 +1015,8 @@ public final class DB
/**
* Execute Update.
- * saves "DBExecuteError" in Log
+ * Saves "DBExecuteError" in Log.
+ * Developer is recommended to call {@link #executeUpdateEx(String, Object[], String, int)} instead.
* @param sql
* @param params array of parameters
* @param ignoreError if true, no execution error is reported
@@ -1062,7 +1066,7 @@ public final class DB
} // executeUpdate
/**
- * Execute Update and throw exception.
+ * Execute update and throw DBException if there are errors.
* @param sql
* @param params statement parameters
* @param trxName transaction
@@ -1075,13 +1079,13 @@ public final class DB
}
/**
- * Execute Update and throw exception.
+ * Execute update and throw DBException if there are errors.
* @param sql
* @param params statement parameters
* @param trxName transaction
* @param timeOut optional timeOut parameter
* @return number of rows updated
- * @throws SQLException
+ * @throws DBException
*/
public static int executeUpdateEx (String sql, Object[] params, String trxName, int timeOut) throws DBException
{
@@ -1118,7 +1122,7 @@ public final class DB
/**
* Execute multiple Update statements.
- * saves (last) "DBExecuteError" in Log
+ * Saves (last) "DBExecuteError" in Log.
* @param sql multiple sql statements separated by "; " SQLSTATEMENT_SEPARATOR
* @param ignoreError if true, no execution error is reported
* @param trxName optional transaction name
@@ -1144,7 +1148,9 @@ public final class DB
} // executeUpdareMultiple
/**
- * Execute Update and throw exception.
+ * Execute update and throw DBException if there are errors.
+ * @param sql
+ * @param trxName
* @see {@link #executeUpdateEx(String, Object[], String)}
*/
public static int executeUpdateEx (String sql, String trxName) throws DBException
@@ -1153,7 +1159,10 @@ public final class DB
} // executeUpdateEx
/**
- * Execute Update and throw exception.
+ * Execute update and throw DBException if there are errors.
+ * @param sql
+ * @param trxName
+ * @param timeOut
* @see {@link #executeUpdateEx(String, Object[], String)}
*/
public static int executeUpdateEx (String sql, String trxName, int timeOut) throws DBException
@@ -1162,11 +1171,10 @@ public final class DB
} // executeUpdateEx
/**
- * Commit - commit on RW connection.
- * Is not required as RW connection is AutoCommit (exception: with transaction)
+ * Commit transaction
* @param throwException if true, re-throws exception
* @param trxName transaction name
- * @return true if not needed or success
+ * @return true if not needed (trxName is null) or success
* @throws SQLException
*/
public static boolean commit (boolean throwException, String trxName) throws SQLException,IllegalStateException
@@ -1202,11 +1210,10 @@ public final class DB
} // commit
/**
- * Rollback - rollback on RW connection.
- * Is has no effect as RW connection is AutoCommit (exception: with transaction)
+ * Rollback transaction
* @param throwException if true, re-throws exception
* @param trxName transaction name
- * @return true if not needed or success
+ * @return true if not needed (trxName is null) or success
* @throws SQLException
*/
public static boolean rollback (boolean throwException, String trxName) throws SQLException
@@ -1244,13 +1251,11 @@ public final class DB
/**
* Get Row Set.
* When a Rowset is closed, it also closes the underlying connection.
- * If the created RowSet is transfered by RMI, closing it makes no difference
* @param sql
* @return row set or null
*/
public static RowSet getRowSet (String sql)
{
- // Bugfix Gunther Hoppe, 02.09.2005, vpj-cd e-evolution
CStatementVO info = new CStatementVO (RowSet.TYPE_SCROLL_INSENSITIVE, RowSet.CONCUR_READ_ONLY, DB.getDatabase().convertStatement(sql));
CPreparedStatement stmt = null;
RowSet retValue = null;
@@ -1322,6 +1327,10 @@ public final class DB
return retValue;
}
+ /**
+ * Reset connection's auto commit to true and read only to false before closing it.
+ * @param conn
+ */
private static void closeAndResetReadonlyConnection(Connection conn) {
try {
conn.setAutoCommit(true);
@@ -1341,7 +1350,7 @@ public final class DB
}
/**
- * Get String Value from sql
+ * Get int value from sql
* @param trxName optional transaction name
* @param sql
* @param params collection of parameters
@@ -1354,7 +1363,8 @@ public final class DB
}
/**
- * Get int Value from sql
+ * Get int Value from sql.
+ * Developer is recommended to call {@link #getSQLValueEx(String, String, Object...)} instead.
* @param trxName optional transaction name
* @param sql
* @param params array of parameters
@@ -1375,7 +1385,8 @@ public final class DB
}
/**
- * Get int Value from sql
+ * Get int value from sql.
+ * Developer is recommended to call {@link #getSQLValueEx(String, String, List)} instead.
* @param trxName optional transaction name
* @param sql
* @param params collection of parameters
@@ -1387,7 +1398,7 @@ public final class DB
}
/**
- * Get String Value from sql
+ * Get string value from sql
* @param trxName optional transaction name
* @param sql
* @param params array of parameters
@@ -1480,7 +1491,8 @@ public final class DB
}
/**
- * Get String Value from sql
+ * Get string value from sql.
+ * Developer is recommended to call {@link #getSQLValueStringEx(String, String, List)} instead.
* @param trxName optional transaction name
* @param sql
* @param params collection of parameters
@@ -1492,7 +1504,7 @@ public final class DB
}
/**
- * Get BigDecimal Value from sql
+ * Get BigDecimal value from sql
* @param trxName optional transaction name
* @param sql
* @param params array of parameters
@@ -1563,9 +1575,9 @@ public final class DB
return getSQLValueBDEx(trxName, sql, params.toArray(new Object[params.size()]));
}
-
/**
- * Get BigDecimal Value from sql
+ * Get BigDecimal Value from sql.
+ * Developer is recommended to call {@link #getSQLValueBDEx(String, String, Object...)} instead.
* @param trxName optional transaction name
* @param sql
* @param params array of parameters
@@ -1584,9 +1596,9 @@ public final class DB
return null;
}
-
/**
- * Get BigDecimal Value from sql
+ * Get BigDecimal Value from sql.
+ * Developer is recommended to call {@link #getSQLValueBDEx(String, String, List)} instead.
* @param trxName optional transaction name
* @param sql
* @param params collection of parameters
@@ -1657,7 +1669,7 @@ public final class DB
}
/**
- * Get BigDecimal Value from sql
+ * Get Timestamp Value from sql
* @param trxName optional transaction name
* @param sql
* @param params collection of parameters
@@ -1670,7 +1682,8 @@ public final class DB
}
/**
- * Get Timestamp Value from sql
+ * Get Timestamp Value from sql.
+ * Developer is recommended to call {@link #getSQLValueTSEx(String, String, Object...)} instead.
* @param trxName optional transaction name
* @param sql
* @param params array of parameters
@@ -1690,7 +1703,8 @@ public final class DB
}
/**
- * Get Timestamp Value from sql
+ * Get Timestamp Value from sql.
+ * Developer is recommended to call {@link #getSQLValueTSEx(String, String, List)} instead.
* @param trxName optional transaction name
* @param sql
* @param params collection of parameters
@@ -1732,6 +1746,7 @@ public final class DB
* @param sql select with id / name as first / second column
* @param optional if true (-1,"") is added
* @param params query parameters
+ * @return Array of Key Name Pairs
*/
public static KeyNamePair[] getKeyNamePairs(String trxName, String sql, boolean optional, Object ... params)
{
@@ -1810,7 +1825,7 @@ public final class DB
/**
* Is Sales Order Trx.
- * Assumes Sales Order. Queries IsSOTrx of table with where clause
+ * Assumes Sales Order. Query IsSOTrx value of table with where clause
* @param TableName table
* @param whereClause where clause
* @param windowNo
@@ -1900,12 +1915,18 @@ public final class DB
return isSOTrx.booleanValue();
} // isSOTrx
+ /**
+ * Delegate to {@link #isSOTrx(String, String, int)} with -1 for windowNo parameter.
+ * @param TableName
+ * @param whereClause
+ * @return true (default) or false if tested that not SO
+ */
public static boolean isSOTrx (String TableName, String whereClause) {
return isSOTrx (TableName, whereClause, -1);
}
- /**************************************************************************
- * Get next number for Key column = 0 is Error.
+ /**
+ * Get next id for table
* @param ctx client
* @param TableName table name
* @param trxName optional transaction name
@@ -1921,11 +1942,12 @@ public final class DB
} // getNextID
/**
- * Get next number for Key column = 0 is Error.
+ * Get next id for table
* @param AD_Client_ID client
* @param TableName table name
* @param trxName optional Transaction Name
* @return next id no
+ * @see {@link MSequence#getNextID(int, String, String)}
*/
public static int getNextID (int AD_Client_ID, String TableName, String trxName)
{
@@ -1962,6 +1984,7 @@ public final class DB
* @param definite asking for a definitive or temporary sequence
* @param po PO
* @return document no or null
+ * @see {@link MSequence#getDocumentNo(int, String, boolean, PO)}
*/
public static String getDocumentNo(int C_DocType_ID, String trxName, boolean definite, PO po)
{
@@ -1969,7 +1992,7 @@ public final class DB
} // getDocumentNo
/**
- * Get Document No from table
+ * Get Document No for table
* @param AD_Client_ID client
* @param TableName table name
* @param trxName optional Transaction Name
@@ -1981,12 +2004,13 @@ public final class DB
}
/**
- * Get Document No from table
+ * Get Document No for table
* @param AD_Client_ID client
* @param TableName table name
* @param trxName optional Transaction Name
* @param po
* @return document no or null
+ * @see {@link MSequence#getDocumentNo(int, String, String, PO)}
*/
public static String getDocumentNo (int AD_Client_ID, String TableName, String trxName, PO po)
{
@@ -1999,8 +2023,8 @@ public final class DB
/**
* Get Document Number for current document.
*
- * - first search for DocType based Document No
- * - then Search for DocumentNo based on TableName
+ * - first search for DocumentNo based on DocType from environment context
+ * - then search for DocumentNo based on TableName
* @param ctx context
* @param WindowNo window
* @param TableName table
@@ -2059,8 +2083,7 @@ public final class DB
return false;
} // isRemoteProcess
-
- /**************************************************************************
+ /**
* Print SQL Warnings.
*
* Usage: DB.printWarning("comment", rs.getWarnings());
@@ -2187,7 +2210,7 @@ public final class DB
} // TO_STRING
/**
- * convenient method to close result set
+ * Convenient method to close result set
* @param rs
*/
public static void close( ResultSet rs) {
@@ -2199,7 +2222,7 @@ public final class DB
}
/**
- * convenient method to close statement
+ * Convenient method to close statement
* @param st
*/
public static void close( Statement st) {
@@ -2211,7 +2234,7 @@ public final class DB
}
/**
- * convenient method to close result set and statement
+ * Convenient method to close result set and statement
* @param rs result set
* @param st statement
* @see #close(ResultSet)
@@ -2223,7 +2246,7 @@ public final class DB
}
/**
- * convenient method to close a {@link POResultSet}
+ * Convenient method to close a {@link POResultSet}
* @param rs result set
* @see POResultSet#close()
*/
@@ -2372,8 +2395,8 @@ public final class DB
}
/**
- * Create persistent selection in T_Selection table
- * remain this function for backward compatibility.
+ * Insert selection into T_Selection table.
+ * Keeping this method for backward compatibility.
* refer: IDEMPIERE-1970
* @param AD_PInstance_ID
* @param selection
@@ -2410,9 +2433,8 @@ public final class DB
}
/**
- * Create persistent selection in T_Selection table
- * saveKeys is map with key is rowID, value is list value of all viewID
- * viewIDIndex is index of viewID need save.
+ * Insert selection into T_Selection table.
+ * saveKeys is map with rowID as key and list of viewID as value.
* @param AD_PInstance_ID
* @param saveKeys - Collection of KeyNamePair
* @param trxName
@@ -2425,9 +2447,8 @@ public final class DB
}
/**
- * Create persistent selection in T_Selection table
- * saveKeys is map with key is rowID, value is list value of all viewID
- * viewIDIndex is index of viewID need save.
+ * Insert selection into T_Selection table.
+ * saveKeys is map with rowID as key and list of viewID as value.
* @param AD_PInstance_ID
* @param saveKeys can receive a Collection of KeyNamePair (IDs) or ValueNamePair (UUIDs)
* @param trxName
@@ -2487,7 +2508,8 @@ public final class DB
private static boolean m_isUUIDVerified = false;
private static boolean m_isUUIDSupported = false;
- /***
+
+ /**
* @return true if current db have working generate_uuid function. generate_uuid doesn't work on 64 bit postgresql
* on windows yet.
*/
@@ -2503,6 +2525,10 @@ public final class DB
return m_isUUIDSupported;
}
+ /**
+ * Throw DBException if trxName doesn't return an existing Trx instance.
+ * @param trxName
+ */
private static void verifyTrx(String trxName) {
if (trxName != null && Trx.get(trxName, false) == null) {
// Using a trx that was previously closed or never opened
@@ -2545,7 +2571,7 @@ public final class DB
}
/**
- * Get an array of objects from sql (one per each column on the select clause), column indexing starts with 0
+ * Get a list of objects from sql (one per each column in the select clause), column indexing starts with 0
* @param trxName optional transaction name
* @param sql
* @param params array of parameters
@@ -2611,7 +2637,8 @@ public final class DB
}
/**
- * Get an array of arrays of objects from sql (one per each row, and one per each column on the select clause), column indexing starts with 0
+ * Get a list of object list from sql (one object list per each row, and in the object list, one object per each column in the select clause),
+ * column indexing starts with 0.
* WARNING: This method must be used just for queries returning few records, using it for many records implies heavy memory consumption
* @param trxName optional transaction name
* @param sql
@@ -2680,7 +2707,7 @@ public final class DB
}
/**
- * Prepare Read Replica Statement
+ * Create Read Replica Prepared Statement proxy
* @param sql
* @param trxName transaction
* @return Prepared Statement (from replica if possible, otherwise normal statement)
@@ -2690,7 +2717,7 @@ public final class DB
}
/**
- * Prepare Read Replica Statement
+ * Create Read Replica Prepared Statement proxy
* @param sql
* @param resultSetType - ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.TYPE_SCROLL_SENSITIVE
* @param resultSetConcurrency - ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
@@ -2714,9 +2741,9 @@ public final class DB
//
return ProxyFactory.newCPreparedStatement(resultSetType, resultSetConcurrency, sql, trxName);
}
-
/**
+ * Create IN clause for csv value
* @param columnName
* @param csv comma separated value
* @return IN clause
@@ -2727,9 +2754,10 @@ public final class DB
}
/**
+ * Create IN clause for csv value
* @param columnName
* @param csv comma separated value
- * @param isNotClause
+ * @param isNotClause true to append NOT before IN
* @return IN clause
*/
public static String inClauseForCSV(String columnName, String csv, boolean isNotClause)
@@ -2765,7 +2793,7 @@ public final class DB
}
/**
- *
+ * Create subset clause for csv value (i.e columnName is a subset of the csv value set)
* @param columnName
* @param csv
* @return subset sql clause
@@ -2776,7 +2804,7 @@ public final class DB
}
/**
- *
+ * Create intersect clause for csv value (i.e columnName is an intersect with the csv value set)
* @param columnName
* @param csv
* @return intersect sql clause
@@ -2785,11 +2813,12 @@ public final class DB
{
return intersectClauseForCSV(columnName, csv, false);
}
+
/**
- *
+ * Create intersect clause for csv value (i.e columnName is an intersect with the csv value set)
* @param columnName
* @param csv
- * @param isNotClause
+ * @param isNotClause true to append NOT before the intersect clause
* @return intersect sql clause
*/
public static String intersectClauseForCSV(String columnName, String csv, boolean isNotClause)
@@ -2798,9 +2827,9 @@ public final class DB
}
/**
- *
+ * Is sql a SELECT statement
* @param sql
- * @return true if it is select sql statement
+ * @return true if it is a SELECT statement
*/
public static boolean isSelectStatement(String sql) {
String removeComments = "/\\*(?:.|[\\n\\r])*?\\*/";
diff --git a/org.adempiere.base/src/org/compiere/util/DefaultContextProvider.java b/org.adempiere.base/src/org/compiere/util/DefaultContextProvider.java
index 90531422ff..04e0c89296 100644
--- a/org.adempiere.base/src/org/compiere/util/DefaultContextProvider.java
+++ b/org.adempiere.base/src/org/compiere/util/DefaultContextProvider.java
@@ -19,9 +19,8 @@ package org.compiere.util;
import java.util.Properties;
/**
- *
+ * Default context provider for swing client
* @author Low Heng Sin
- *
*/
public class DefaultContextProvider implements ContextProvider {
diff --git a/org.adempiere.base/src/org/compiere/util/DefaultEvaluatee.java b/org.adempiere.base/src/org/compiere/util/DefaultEvaluatee.java
index cd52b171ae..1495205186 100644
--- a/org.adempiere.base/src/org/compiere/util/DefaultEvaluatee.java
+++ b/org.adempiere.base/src/org/compiere/util/DefaultEvaluatee.java
@@ -34,8 +34,8 @@ import org.compiere.model.MTable;
import org.compiere.model.PO;
/**
+ * Default {@link Evaluatee} implementation
* @author hengsin
- *
*/
public class DefaultEvaluatee implements Evaluatee {
@@ -46,7 +46,6 @@ public class DefaultEvaluatee implements Evaluatee {
private static final ReferenceCache s_ReferenceCache = new ReferenceCache("DefaultEvaluatee_ReferenceCache", 100, 1, 2000);
/**
- *
* @param gridTab
* @param windowNo
* @param tabNo
diff --git a/org.adempiere.base/src/org/compiere/util/DefaultKeyStore.java b/org.adempiere.base/src/org/compiere/util/DefaultKeyStore.java
index 2161f2216e..14f3b0fa16 100644
--- a/org.adempiere.base/src/org/compiere/util/DefaultKeyStore.java
+++ b/org.adempiere.base/src/org/compiere/util/DefaultKeyStore.java
@@ -29,9 +29,9 @@ import javax.crypto.SecretKey;
import org.adempiere.base.IKeyStore;
/**
+ * Default {@link IKeyStore} implementation
* @author deepak
* @author hengsin
- *
*/
public class DefaultKeyStore implements IKeyStore {
diff --git a/org.adempiere.base/src/org/compiere/util/DisplayType.java b/org.adempiere.base/src/org/compiere/util/DisplayType.java
index 11d1b3b9ab..db4121f6c3 100644
--- a/org.adempiere.base/src/org/compiere/util/DisplayType.java
+++ b/org.adempiere.base/src/org/compiere/util/DisplayType.java
@@ -87,7 +87,7 @@ import org.compiere.model.MLanguage;
import org.compiere.model.MTable;
/**
- * System Display Types.
+ * System Display/Data Types.
*
* SELECT AD_Reference_ID, Name FROM AD_Reference WHERE ValidationType = 'D'
*
diff --git a/org.adempiere.base/src/org/compiere/util/EMail.java b/org.adempiere.base/src/org/compiere/util/EMail.java
index 89f91b3282..9c2a5ac9c5 100644
--- a/org.adempiere.base/src/org/compiere/util/EMail.java
+++ b/org.adempiere.base/src/org/compiere/util/EMail.java
@@ -53,11 +53,11 @@ import org.compiere.model.MSysConfig;
import com.sun.mail.smtp.SMTPMessage;
/**
- * EMail Object.
+ * EMail delivery and receive support for iDempiere
+ *
* When I try to send a message, I get javax.mail.SendFailedException:
* 550 Unable to relay for my-address
@@ -72,7 +72,7 @@ import com.sun.mail.smtp.SMTPMessage;
public final class EMail implements Serializable
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -8982983766981221312L;
@@ -83,7 +83,6 @@ public final class EMail implements Serializable
public final static String EMAIL_SEND_MSG = "EmailSendMsg";
/**
- * Full Constructor
* @param client the client
* @param from Sender's EMail address
* @param to Recipient EMail address
@@ -97,7 +96,6 @@ public final class EMail implements Serializable
} // EMail
/**
- * Full Constructor
* @param client the client
* @param from Sender's EMail address
* @param to Recipient EMail address
@@ -112,7 +110,6 @@ public final class EMail implements Serializable
} // EMail
/**
- * Full Constructor
* @param ctx context
* @param smtpHost The mail server
* @param from Sender's EMail address
@@ -127,7 +124,6 @@ public final class EMail implements Serializable
}
/**
- * Full Constructor
* @param ctx context
* @param smtpHost The mail server
* @param from Sender's EMail address
@@ -143,7 +139,6 @@ public final class EMail implements Serializable
}
/**
- * Full Constructor
* @param ctx context
* @param smtpHost The mail server
* @param smtpPort
diff --git a/org.adempiere.base/src/org/compiere/util/EMailAuthenticator.java b/org.adempiere.base/src/org/compiere/util/EMailAuthenticator.java
index ba1426da46..5cf0ca2d85 100644
--- a/org.adempiere.base/src/org/compiere/util/EMailAuthenticator.java
+++ b/org.adempiere.base/src/org/compiere/util/EMailAuthenticator.java
@@ -27,7 +27,7 @@ import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.MAuthorizationAccount;
/**
- * Email User Authentification
+ * Email User Authentication
*
* @author Jorg Janke
* @version $Id: EMailAuthenticator.java,v 1.2 2006/07/30 00:54:36 jjanke Exp $
diff --git a/org.adempiere.base/src/org/compiere/util/EmailSrv.java b/org.adempiere.base/src/org/compiere/util/EmailSrv.java
index 89aecd75c1..b81a1f54d2 100644
--- a/org.adempiere.base/src/org/compiere/util/EmailSrv.java
+++ b/org.adempiere.base/src/org/compiere/util/EmailSrv.java
@@ -57,14 +57,12 @@ import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.MAuthorizationAccount;
/**
- * provide function for sent, receive email in imap protocol
- * current only support receive email, for sent email refer {@link org.compiere.util.EMail}
- * in case internet line is slow, handle error when analysis message by fetch message part when need can complicate.
- * consider to add flag fetch all message at one time (with retry when error).
- * after that, analysis offline message.
+ * Provide function for sent, receive email in imap protocol.
+ * Current only support receive email, for sent email refer {@link org.compiere.util.EMail}.
+ * In case internet line is slow, handling error during analysis of message by fetching message in part can have complication.
+ * Consider to add flag to fetch all message at one time (with retry when error) and after fetching, analysis fetched message offline.
* http://www.oracle.com/technetwork/java/javamail/faq/index.html#imapserverbug
* @author hieplq base in RequestEMailProcessor
- *
*/
public class EmailSrv {
protected transient static CLogger log = CLogger.getCLogger (EmailSrv.class);
diff --git a/org.adempiere.base/src/org/compiere/util/Env.java b/org.adempiere.base/src/org/compiere/util/Env.java
index bbd2a573f8..3c968a6b5b 100644
--- a/org.adempiere.base/src/org/compiere/util/Env.java
+++ b/org.adempiere.base/src/org/compiere/util/Env.java
@@ -70,7 +70,7 @@ import org.compiere.process.SvrProcess;
* @author Jorg Janke
* @version $Id: Env.java,v 1.3 2006/07/30 00:54:36 jjanke Exp $
*
- * @author Teo Sarca, www.arhipac.ro
+ * @author Teo Sarca, www.arhipac.ro
*
BF [ 1619390 ] Use default desktop browser as external browser
*
BF [ 2017987 ] Env.getContext(TAB_INFO) should NOT use global context
*
FR [ 2392044 ] Introduce Env.WINDOW_MAIN
@@ -163,6 +163,7 @@ public final class Env
}
/**
+ * Add environment event listener
* @param listener
*/
public static void addEventListener(IEnvEventListener listener)
@@ -171,6 +172,7 @@ public final class Env
}
/**
+ * Remove environment event listener
* @param listener
* @return boolean
*/
@@ -221,7 +223,7 @@ public final class Env
/**
* Reset Cache
- * @param finalCall everything otherwise login data remains
+ * @param finalCall true to clear everything otherwise login data remains
*/
public static void reset (boolean finalCall)
{
@@ -263,14 +265,10 @@ public final class Env
}
} // resetAll
-
- /**************************************************************************
- * Application Context
- */
- /** WindowNo for Main */
+ /** Window No for Main */
public static final int WINDOW_MAIN = 0;
- /** Tab for Info */
+ /** Tab No for Info */
public static final int TAB_INFO = 1113;
/**
@@ -282,6 +280,10 @@ public final class Env
return getContextProvider().getContext();
} // getCtx
+ /**
+ * Get context provider
+ * @return context provider for current environment
+ */
public static ContextProvider getContextProvider() {
if (Ini.isClient())
return clientContextProvider;
@@ -290,7 +292,7 @@ public final class Env
}
/**
- * Replace the contents of the current session/process context.
+ * Replace the contents of the current session/process context.
* Don't use this to setup a new session/process context, use ServerContext.setCurrentInstance instead.
* @param ctx context
*/
@@ -449,6 +451,14 @@ public final class Env
ctx.setProperty(WindowNo+"|"+context, String.valueOf(value));
} // setContext
+ /**
+ * Set context value for window and tab
+ * @param ctx
+ * @param WindowNo
+ * @param TabNo
+ * @param context context key
+ * @param value context value
+ */
public static void setContext (Properties ctx, int WindowNo, int TabNo, String context, int value)
{
if (ctx == null || context == null)
@@ -470,14 +480,20 @@ public final class Env
setContext (ctx, WindowNo, context, convert(value));
} // setContext
+ /**
+ * Convert boolean value to Y or N
+ * @param value
+ * @return Y for true, N for false
+ */
private static String convert(boolean value) {
return value ? "Y" : "N";
}
/**
- * Set Context for Window to Y/N Value
+ * Set Context for Window and tab to Y/N Value
* @param ctx context
* @param WindowNo window no
+ * @param TabNo
* @param context context key
* @param value context value
*/
@@ -563,9 +579,8 @@ public final class Env
ctx.setProperty(WindowNo+"|AutoNew", convert(autoNew));
} // setAutoNew
-
/**
- * Set SO Trx
+ * Set IsSOTrx Y/N flag
* @param ctx context
* @param isSOTrx SO Context
*/
@@ -624,8 +639,8 @@ public final class Env
} // getContext
/**
- * Get Value of Context for Window.
- * if not found global context if available
+ * Get Value of Context for Window.
+ * If not found, try global context.
* @param ctx context
* @param WindowNo window
* @param context context key
@@ -637,9 +652,9 @@ public final class Env
} // getContext
/**
- * Get Value of Context for Window and Tab,
- * if not found global context if available.
- * If TabNo is TAB_INFO only tab's context will be checked.
+ * Get Value of Context for Window and Tab.
+ * If not found, try global context.
+ * If TabNo is TAB_INFO, only tab's context will be checked.
* @param ctx context
* @param WindowNo window no
* @param TabNo tab no
@@ -661,9 +676,9 @@ public final class Env
} // getContext
/**
- * Get Value of Context for Window and Tab,
- * if not found global context if available.
- * If TabNo is TAB_INFO only tab's context will be checked.
+ * Get Value of Context for Window and Tab.
+ * If not found, try global context.
+ * If TabNo is TAB_INFO, only tab's context will be checked.
* @param ctx context
* @param WindowNo window no
* @param TabNo tab no
@@ -677,9 +692,9 @@ public final class Env
}
/**
- * Get Value of Context for Window and Tab,
- * if not found global context if available.
- * If TabNo is TAB_INFO only tab's context will be checked.
+ * Get Value of Context for Window and Tab.
+ * If not found, try global context.
+ * If TabNo is TAB_INFO, only tab's context will be checked.
* @param ctx context
* @param WindowNo window no
* @param TabNo tab no
@@ -755,7 +770,7 @@ public final class Env
* @param ctx context
* @param WindowNo window no
* @param context context key
- * @param onlyWindow if true, no defaults are used unless explicitly asked for
+ * @param onlyWindow if true, do not try global context if context key not found with window
* @return value or 0
*/
public static int getContextAsInt(Properties ctx, int WindowNo, String context, boolean onlyWindow)
@@ -836,7 +851,6 @@ public final class Env
return isAutoCommit(ctx);
} // isAutoCommit
-
/**
* Is Auto New Record
* @param ctx context
@@ -873,7 +887,6 @@ public final class Env
return isAutoNew(ctx);
} // isAutoNew
-
/**
* Is Sales Order Trx
* @param ctx context
@@ -902,8 +915,8 @@ public final class Env
} // isSOTrx
/**
- * Get Context and convert it to a Timestamp
- * if error return today's date
+ * Get Context and convert it to Timestamp.
+ * If error return today's date.
* @param ctx context
* @param context context key
* @return Timestamp
@@ -914,8 +927,8 @@ public final class Env
} // getContextAsDate
/**
- * Get Context and convert it to a Timestamp
- * if error return today's date
+ * Get Context and convert it to Timestamp.
+ * If error return today's date.
* @param ctx context
* @param WindowNo window no
* @param context context key
@@ -994,7 +1007,7 @@ public final class Env
return Env.getContextAsInt(ctx, AD_ROLE_ID);
} // getAD_Role_ID
- /**************************************************************************
+ /**
* Get Preference.
*
* 0) Current Setting
@@ -1032,13 +1045,13 @@ public final class Env
} // getPreference
/**
- * get preference of process from env
+ * Get preference of process from environment context
* @param ctx
* @param AD_Window_ID
* @param AD_InfoWindow
* @param AD_Process_ID_Of_Panel
* @param context
- * @return
+ * @return preference value
*/
public static String getPreference (Properties ctx, int AD_Window_ID, int AD_InfoWindow, int AD_Process_ID_Of_Panel, String context)
{
@@ -1052,12 +1065,12 @@ public final class Env
} // getPreference
/**
- * get preference of info window from env
+ * Get preference of info window from environment context
* @param ctx
* @param AD_Window_ID
* @param AD_InfoWindow
* @param context
- * @return
+ * @return preference value
*/
public static String getPreference (Properties ctx, int AD_Window_ID, int AD_InfoWindow, String context)
{
@@ -1070,61 +1083,36 @@ public final class Env
return (retValue == null ? "" : retValue);
} // getPreference
- /**************************************************************************
- * Language issues
- */
-
/**
* Check Base Language
* @param ctx context
- * @param tableName table to be translated
- * @return true if base language and table not translated
+ * @param tableName ignore
+ * @return true if language value in ctx is base language
*/
public static boolean isBaseLanguage (Properties ctx, String tableName)
{
- /**
- if (isBaseTranslation(tableName))
- return Language.isBaseLanguage (getAD_Language(ctx));
- else // No AD Table
- if (!isMultiLingualDocument(ctx))
- return true; // access base table
- **/
return Language.isBaseLanguage (getAD_Language(ctx));
} // isBaseLanguage
/**
* Check Base Language
* @param AD_Language language
- * @param tableName table to be translated
- * @return true if base language and table not translated
+ * @param tableName ignore
+ * @return true if AD_Language is base language
*/
public static boolean isBaseLanguage (String AD_Language, String tableName)
{
- /**
- if (isBaseTranslation(tableName))
- return Language.isBaseLanguage (AD_Language);
- else // No AD Table
- if (!isMultiLingualDocument(s_ctx)) // Base Context
- return true; // access base table
- **/
return Language.isBaseLanguage (AD_Language);
} // isBaseLanguage
/**
* Check Base Language
* @param language language
- * @param tableName table to be translated
- * @return true if base language and table not translated
+ * @param tableName ignore
+ * @return true if language is base language
*/
public static boolean isBaseLanguage (Language language, String tableName)
{
- /**
- if (isBaseTranslation(tableName))
- return language.isBaseLanguage();
- else // No AD Table
- if (!isMultiLingualDocument(s_ctx)) // Base Context
- return true; // access base table
- **/
return language.isBaseLanguage();
} // isBaseLanguage
@@ -1143,9 +1131,9 @@ public final class Env
/**
* Do we have Multi-Lingual Documents.
- * Set in DB.loadOrgs
+ * Set in DB.loadOrgs.
* @param ctx context
- * @return true if multi lingual documents
+ * @return true if tenant is using multi lingual documents
*/
public static boolean isMultiLingualDocument (Properties ctx)
{
@@ -1153,7 +1141,8 @@ public final class Env
} // isMultiLingualDocument
/**
- * Get System AD_Language
+ * Get AD_Language value in context.
+ * Fall back to base language if there's no AD_Language value in context.
* @param ctx context
* @return AD_Language eg. en_US
*/
@@ -1169,7 +1158,8 @@ public final class Env
} // getAD_Language
/**
- * Get System Language
+ * Get Language from context.
+ * Fall back to base language if there's no language value in context.
* @param ctx context
* @return Language
*/
@@ -1187,7 +1177,7 @@ public final class Env
/**
* Get Login Language
* @param ctx context
- * @return Language
+ * @return Login Language
*/
public static Language getLoginLanguage (Properties ctx)
{
@@ -1195,7 +1185,8 @@ public final class Env
} // getLanguage
/**
- * @param ctx
+ * Get language from locale value in context
+ * @param ctx context
* @return Language
*/
public static Language getLocaleLanguage(Properties ctx) {
@@ -1211,7 +1202,8 @@ public final class Env
}
/**
- * @param ctx
+ * Get locale value in context
+ * @param ctx context
* @return Locale
*/
public static Locale getLocale(Properties ctx) {
@@ -1232,6 +1224,10 @@ public final class Env
return locale;
}
+ /**
+ * Get list of language from AD_Message_Trl.
+ * @return list of supported language
+ */
public static ArrayList getSupportedLanguages()
{
ArrayList AD_Languages = new ArrayList();
@@ -1261,6 +1257,10 @@ public final class Env
return AD_Languages;
}
+ /**
+ * Get list of active login languages
+ * @return list of active login languages
+ */
public static ArrayList getLoginLanguages()
{
ArrayList AD_Languages = new ArrayList();
@@ -1294,7 +1294,7 @@ public final class Env
/**
* Verify Language.
- * Check that language is supported by the system
+ * Check that language is supported by the system.
* @param ctx might be updated with new AD_Language
* @param language language
*/
@@ -1358,17 +1358,16 @@ public final class Env
}
// We found same language
- // if (!"0".equals(Msg.getMsg(AD_Language, "0")))
log.warning ("Not System Language=" + language
+ " - Set to Base Language " + Language.getBaseAD_Language());
language.setAD_Language(Language.getBaseAD_Language());
} // verifyLanguage
- /**************************************************************************
+ /**
* Get Context as String array with format: key == value
* @param ctx context
- * @return context string
+ * @return context string array
*/
public static String[] getEntireContext(Properties ctx)
{
@@ -1387,7 +1386,7 @@ public final class Env
} // getEntireContext
/**
- * Get Header info (connection, org, user)
+ * Get Header info (documentno, value, name, user name, tenant name and organization name)
* @param ctx context
* @param WindowNo window
* @return Header String
@@ -1486,8 +1485,10 @@ public final class Env
* @param WindowNo Number of Window
* @param value Message to be parsed
* @param onlyWindow if true, no defaults are used
- * @param ignoreUnparsable if true, unsuccessful @return parsed String or "" if not successful and ignoreUnparsable
- * @return parsed context
+ * @param ignoreUnparsable
+ * If true, just skip context variable that's not resolvable.
+ * If false, return "" if there are context variable that's not resolvable.
+ * @return parsed message
*/
public static String parseContext (Properties ctx, int WindowNo, String value,
boolean onlyWindow, boolean ignoreUnparsable)
@@ -1558,8 +1559,10 @@ public final class Env
* @param tabNo Number of Tab
* @param value Message to be parsed
* @param onlyTab if true, only value from tabNo are used
- * @param ignoreUnparsable if true, unsuccessful @return parsed String or "" if not successful and ignoreUnparsable
- * @return parsed context
+ * @param ignoreUnparsable
+ * If true, just skip context variable that's not resolvable.
+ * If false, return "" if there are context variable that's not resolvable.
+ * @return parsed message
*/
public static String parseContext (Properties ctx, int WindowNo, int tabNo, String value,
boolean onlyTab, boolean ignoreUnparsable)
@@ -1683,8 +1686,8 @@ public final class Env
* @param useColumnDateFormat
* @param useMsgForBoolean
* @param trxName
- * @param keepUnparseable
- * @return String
+ * @param keepUnparseable true to keep original context variable tag that can't be resolved
+ * @return Parsed expression
*/
public static String parseVariable(String expression, PO po, String trxName, boolean useColumnDateFormat,
boolean useMsgForBoolean, boolean keepUnparseable) {
@@ -1792,6 +1795,19 @@ public final class Env
return outStr.toString();
}
+ /**
+ * Append formatted value to outStr buffer
+ * @param ctx
+ * @param po
+ * @param trxName
+ * @param useColumnDateFormat
+ * @param useMsgForBoolean
+ * @param token
+ * @param format
+ * @param colToken
+ * @param value
+ * @param outStr
+ */
private static void appendValue(Properties ctx, PO po, String trxName, boolean useColumnDateFormat, boolean useMsgForBoolean,
String token, String format, MColumn colToken, Object value, StringBuilder outStr) {
if (format != null && format.length() > 0) {
@@ -1878,8 +1894,6 @@ public final class Env
}
}
- /*************************************************************************/
-
/**
* Clean up context for Window (i.e. delete it)
* @param WindowNo window
@@ -1900,14 +1914,13 @@ public final class Env
/**
* Get ImageIcon.
*
- * @param fileNameInImageDir full file name in imgaes folder (e.g. Bean16.gif)
+ * @param fileNameInImageDir file name in images folder (e.g. Bean16.gif)
* @return image
*/
public static ImageIcon getImageIcon (String fileNameInImageDir)
{
IResourceFinder rf = Core.getResourceFinder();
URL url = rf.getResource("images/" + fileNameInImageDir);
-// URL url = Adempiere.class.getResource("images/" + fileNameInImageDir);
if (url == null)
{
if (log.isLoggable(Level.INFO)) log.log(Level.INFO, "Not found: " + fileNameInImageDir);
@@ -1922,17 +1935,15 @@ public final class Env
* method will first try .gif and then .png if .gif does not
* exists.
*
- * @param fileName file name in imgaes folder without the extension(e.g. Bean16)
+ * @param fileName file name in images folder without the extension(e.g. Bean16)
* @return image
*/
public static ImageIcon getImageIcon2 (String fileName)
{
IResourceFinder rf = Core.getResourceFinder();
URL url = rf.getResource("images/" + fileName+".gif");
-// URL url = Adempiere.class.getResource("images/" + fileName+".gif");
if (url == null)
url = rf.getResource("images/" + fileName+".png");
-// url = Adempiere.class.getResource("images/" + fileName+".png");
if (url == null)
{
if (log.isLoggable(Level.INFO)) log.log(Level.INFO, "GIF/PNG Not found: " + fileName);
@@ -1941,9 +1952,8 @@ public final class Env
return new ImageIcon(url);
} // getImageIcon2
-
- /***************************************************************************
- * Start Browser
+ /**
+ * Show url in Browser
* @param url url
*/
public static void startBrowser (String url)
@@ -2000,6 +2010,7 @@ public final class Env
* @param ctx
* @return Properties
*/
+ @Deprecated(forRemoval = true, since = "11")
public static Properties getRemoteCallCtx(Properties ctx)
{
Properties p = new Properties();
@@ -2020,12 +2031,12 @@ public final class Env
}
/**
- * Get Window Model
+ * Get Window value object model
*
* @param WindowNo Window No
* @param AD_Window_ID window
* @param AD_Menu_ID menu
- * @return Model Window Value Obkect
+ * @return Model Window Value Object
*/
public static GridWindowVO getMWindowVO (int WindowNo, int AD_Window_ID, int AD_Menu_ID)
{
@@ -2037,18 +2048,28 @@ public final class Env
return mWindowVO;
} // getWindow
- //Current Process
+ /**
+ * Get IProcessUI instance
+ * @param ctx
+ * @return IProcessUI instance or null
+ */
public static IProcessUI getProcessUI(Properties ctx)
{
return (IProcessUI) ctx.get(SvrProcess.PROCESS_UI_CTX_KEY);
}
+ /**
+ * Get process info instance
+ * @param ctx
+ * @return process info instance or null
+ */
public static ProcessInfo getProcessInfo(Properties ctx)
{
return (ProcessInfo) ctx.get(SvrProcess.PROCESS_INFO_CTX_KEY);
}
/**
+ * Get footer trademark text for report
* @return trademark text for standard report footer
*/
public static String getStandardReportFooterTrademarkText() {
@@ -2060,6 +2081,11 @@ public final class Env
return s;
}
+ /**
+ * Get zoom AD_Window_ID
+ * @param query
+ * @return zoom AD_Window_ID
+ */
public static int getZoomWindowID(MQuery query)
{
int AD_Window_ID = MZoomCondition.findZoomWindow(query);
@@ -2109,25 +2135,59 @@ public final class Env
return AD_Window_ID;
}
+ /**
+ * Get zoom AD_Window_ID
+ * @param AD_Table_ID
+ * @param Record_UU
+ * @return zoom AD_Window_ID
+ */
public static int getZoomWindowUU(int AD_Table_ID, String Record_UU) {
return getZoomWindowUU(AD_Table_ID, Record_UU, 0);
}
+ /**
+ * Get zoom AD_Window_ID
+ * @param AD_Table_ID
+ * @param Record_UU
+ * @param windowNo
+ * @return zoom AD_Window_ID
+ */
public static int getZoomWindowUU(int AD_Table_ID, String Record_UU, int windowNo)
{
return getZoomWindowIDOrUU(AD_Table_ID, -1, Record_UU, windowNo);
}
+ /**
+ * Get zoom AD_Window_ID
+ * @param AD_Table_ID
+ * @param Record_ID
+ * @return zoom AD_Window_ID
+ */
public static int getZoomWindowID(int AD_Table_ID, int Record_ID)
{
return getZoomWindowID(AD_Table_ID, Record_ID, 0);
}
+ /**
+ * Get zoom AD_Window_ID
+ * @param AD_Table_ID
+ * @param Record_ID
+ * @param windowNo
+ * @return zoom AD_Window_ID
+ */
public static int getZoomWindowID(int AD_Table_ID, int Record_ID, int windowNo)
{
return getZoomWindowIDOrUU(AD_Table_ID, Record_ID, null, windowNo);
}
+ /**
+ * Get zoom AD_Window_ID
+ * @param AD_Table_ID
+ * @param Record_ID
+ * @param Record_UU
+ * @param windowNo
+ * @return zoom AD_Window_ID
+ */
private static int getZoomWindowIDOrUU(int AD_Table_ID, int Record_ID, String Record_UU, int windowNo)
{
int AD_Window_ID = MZoomCondition.findZoomWindowByTableIdOrUU(AD_Table_ID, Record_ID, Record_UU, windowNo);
@@ -2161,12 +2221,6 @@ public final class Env
return AD_Window_ID;
}
-
-
- /**************************************************************************
- * Static Variables
- */
-
/** Big Decimal 0 */
static final public BigDecimal ZERO = BigDecimal.valueOf(0.0);
/** Big Decimal 1 */
@@ -2179,7 +2233,6 @@ public final class Env
/* Prefix for predefined context variables coming from menu, window or role definition */
public static final String PREFIX_PREDEFINED_VARIABLE = "+";
-
/**
* Static initializer
*/
@@ -2189,14 +2242,15 @@ public final class Env
getCtx().put(LANGUAGE, Language.getBaseAD_Language());
} // static
-
/**
- * Add in context predefined variables with prefix +, coming from menu, window or role definition
+ *
+ * Add in context predefined variables with prefix +, coming from menu, window or role definition.
* Predefined variables must come separated by new lines in one of the formats:
* VAR=VALUE
* VAR="VALUE"
* VAR='VALUE'
- * The + prefix is not required, is added here to the defined variables
+ * The + prefix is not required, is added here to the defined variables.
+ *
* @param ctx
* @param windowNo window number or -1 to global level
* @param predefinedVariables
@@ -2226,6 +2280,7 @@ public final class Env
}
/**
+ * Is log migration script for SQL statement
* @param tableName
* @return true if log migration script is turn on and should be used for tableName
*/
@@ -2242,6 +2297,7 @@ public final class Env
}
/**
+ * Is use centralized id from id server
* @return true if centralized id is turn on and should be used for tableName
*/
public static boolean isUseCentralizedId(String tableName)
diff --git a/org.adempiere.base/src/org/compiere/util/EnvLoader.java b/org.adempiere.base/src/org/compiere/util/EnvLoader.java
index 1a9cbd3046..a1e5bcadf7 100644
--- a/org.adempiere.base/src/org/compiere/util/EnvLoader.java
+++ b/org.adempiere.base/src/org/compiere/util/EnvLoader.java
@@ -21,7 +21,7 @@ import java.util.Properties;
import java.util.StringTokenizer;
/**
- * Environment Loader - loads system environment variables int System.properties
+ * Environment Loader - loads system environment variables in System.properties
*
* @author Jorg Janke
* @version $Id: EnvLoader.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
diff --git a/org.adempiere.base/src/org/compiere/util/Evaluatee.java b/org.adempiere.base/src/org/compiere/util/Evaluatee.java
index b32449d9a3..9736ca3eea 100644
--- a/org.adempiere.base/src/org/compiere/util/Evaluatee.java
+++ b/org.adempiere.base/src/org/compiere/util/Evaluatee.java
@@ -16,9 +16,8 @@
*****************************************************************************/
package org.compiere.util;
-
/**
- * Evaluator source
+ * Variable evaluation interface
*
* @author Jorg Janke
* @version $Id: Evaluatee.java,v 1.2 2006/07/30 00:54:35 jjanke Exp $
diff --git a/org.adempiere.base/src/org/compiere/util/Evaluator.java b/org.adempiere.base/src/org/compiere/util/Evaluator.java
index 31ee06371c..197f7ce8dd 100644
--- a/org.adempiere.base/src/org/compiere/util/Evaluator.java
+++ b/org.adempiere.base/src/org/compiere/util/Evaluator.java
@@ -27,7 +27,6 @@ import java.util.logging.Level;
import org.idempiere.expression.logic.LogicEvaluator;
-
/**
* Expression Evaluator
*
@@ -41,6 +40,7 @@ public class Evaluator
private static final Map sqlLogicCache = new ConcurrentHashMap<>();
+ /** Value object for SQL logic result */
public static class SQLLogicResult {
long timestamp;
boolean value;
@@ -81,10 +81,10 @@ public class Evaluator
} // isAllVariablesDefined
/**
- * Evaluate Logic.
+ * Evaluate logic expression
* @see LogicEvaluator#evaluateLogic(Evaluatee, String)
* @param source class implementing get_ValueAsString(variable)
- * @param logic logic string
+ * @param logic logic expression
* @return logic result
*/
public static boolean evaluateLogic (Evaluatee source, String logic)
@@ -101,7 +101,6 @@ public class Evaluator
{
if (parseString == null || parseString.length() == 0)
return;
- // log.fine( "MField.parseDepends", parseString);
String s = parseString;
// while we have variables
while (s.indexOf('@') != -1)
@@ -113,7 +112,6 @@ public class Evaluator
continue; // error number of @@ not correct
String variable = s.substring(0, pos);
s = s.substring(pos+1);
- // log.fine( variable);
if (variable.startsWith("~"))
variable = variable.substring(1);
// strip also @tabno|
@@ -127,13 +125,13 @@ public class Evaluator
} // parseDepends
/**
- * evaluator a expression logic base on sql
+ * Evaluate a logic expression base on SQL
* @param sqlLogic
* @param ctx
* @param windowNo
* @param tabNo
* @param targetObjectName expression logic is evaluated for, that target object (purpose for logging) can be field name, toolbar button name,..
- * @return
+ * @return result of logic expression
*/
public static boolean parseSQLLogic(String sqlLogic, Properties ctx, int windowNo, int tabNo, String targetObjectName) {
String sql = sqlLogic.substring(5); // remove @SQL=
diff --git a/org.adempiere.base/src/org/compiere/util/ExecuteResult.java b/org.adempiere.base/src/org/compiere/util/ExecuteResult.java
index 095d90b374..638531cd9c 100644
--- a/org.adempiere.base/src/org/compiere/util/ExecuteResult.java
+++ b/org.adempiere.base/src/org/compiere/util/ExecuteResult.java
@@ -5,6 +5,7 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
+@Deprecated(forRemoval = true, since = "11")
public class ExecuteResult implements Serializable {
/**
*
diff --git a/org.adempiere.base/src/org/compiere/util/ExtensionFileFilter.java b/org.adempiere.base/src/org/compiere/util/ExtensionFileFilter.java
index fb1947f8f5..e9eec6dd9c 100644
--- a/org.adempiere.base/src/org/compiere/util/ExtensionFileFilter.java
+++ b/org.adempiere.base/src/org/compiere/util/ExtensionFileFilter.java
@@ -28,6 +28,7 @@ import javax.swing.filechooser.FileFilter;
* @author Jorg Janke
* @version $Id: ExtensionFileFilter.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
*/
+@Deprecated(forRemoval = true, since = "11")
public class ExtensionFileFilter extends FileFilter
implements Serializable
{
diff --git a/org.adempiere.base/src/org/compiere/util/FileUpload.java b/org.adempiere.base/src/org/compiere/util/FileUpload.java
index e3ea5b131c..8a6eebefd4 100644
--- a/org.adempiere.base/src/org/compiere/util/FileUpload.java
+++ b/org.adempiere.base/src/org/compiere/util/FileUpload.java
@@ -41,6 +41,7 @@ import org.apache.ecs.xhtml.label;
* @author Jorg Janke
* @version $Id: FileUpload.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
*/
+@Deprecated(forRemoval = true, since = "11")
public class FileUpload
{
/**
diff --git a/org.adempiere.base/src/org/compiere/util/GenericPaymentExport.java b/org.adempiere.base/src/org/compiere/util/GenericPaymentExport.java
index 42e45d4ece..6b81fe0b48 100644
--- a/org.adempiere.base/src/org/compiere/util/GenericPaymentExport.java
+++ b/org.adempiere.base/src/org/compiere/util/GenericPaymentExport.java
@@ -30,7 +30,7 @@ import org.compiere.model.MPaySelectionCheck;
import org.compiere.model.MPaySelectionLine;
/**
- * Generic Payment Export
+ * Generic Payment Export.
* Sample implementation of Payment Export Interface - brought here from MPaySelectionCheck
*
* @author Jorg Janke
@@ -43,7 +43,6 @@ public class GenericPaymentExport implements PaymentExport
/** Logger */
static private CLogger s_log = CLogger.getCLogger (GenericPaymentExport.class);
-
/** BPartner Info Index for Value */
private static final int BP_VALUE = 0;
/** BPartner Info Index for Name */
@@ -65,8 +64,7 @@ public class GenericPaymentExport implements PaymentExport
/** BPartner Info Index for Reference No */
private static final int BP_REFNO = 9;
-
- /**************************************************************************
+ /**
* Export to File
* @param checks array of checks
* @param depositBatch book the payments as single position
@@ -181,7 +179,7 @@ public class GenericPaymentExport implements PaymentExport
/**
* Get Customer/Vendor Info.
- * Based on BP_ static variables
+ * Based on BP_ static variables.
* @param C_BPartner_ID BPartner
* @return info array
*/
@@ -286,4 +284,4 @@ public class GenericPaymentExport implements PaymentExport
return false;
}
-} // PaymentExporterInterface
+}
diff --git a/org.adempiere.base/src/org/compiere/util/GetCacheInfoCallable.java b/org.adempiere.base/src/org/compiere/util/GetCacheInfoCallable.java
index 6c9b77d36e..aaeb9621bc 100644
--- a/org.adempiere.base/src/org/compiere/util/GetCacheInfoCallable.java
+++ b/org.adempiere.base/src/org/compiere/util/GetCacheInfoCallable.java
@@ -30,12 +30,10 @@ import java.util.List;
import java.util.concurrent.Callable;
/**
- *
+ * Callable to collect cache info from distributed cache nodes
* @author hengsin
- *
*/
public class GetCacheInfoCallable implements Callable>, Serializable {
-
/**
* generated serial id
diff --git a/org.adempiere.base/src/org/compiere/util/HtmlCode.java b/org.adempiere.base/src/org/compiere/util/HtmlCode.java
index f9a74115f7..be8afc8cca 100644
--- a/org.adempiere.base/src/org/compiere/util/HtmlCode.java
+++ b/org.adempiere.base/src/org/compiere/util/HtmlCode.java
@@ -30,7 +30,7 @@ public class HtmlCode extends MultiPartElement
implements Printable
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 4231482888802431943L;
diff --git a/org.adempiere.base/src/org/compiere/util/IEnvEventListener.java b/org.adempiere.base/src/org/compiere/util/IEnvEventListener.java
index 09d8cb3671..f7b6bdc6f3 100644
--- a/org.adempiere.base/src/org/compiere/util/IEnvEventListener.java
+++ b/org.adempiere.base/src/org/compiere/util/IEnvEventListener.java
@@ -1,8 +1,40 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.compiere.util;
+/**
+ * Interface for environment event listener
+ */
public interface IEnvEventListener {
+ /**
+ * On clear window context event
+ * @param windowNo
+ */
public void onClearWindowContext(int windowNo);
+ /**
+ * On reset environment event
+ * @param finalCall
+ */
public void onReset(boolean finalCall);
}
diff --git a/org.adempiere.base/src/org/compiere/util/Ini.java b/org.adempiere.base/src/org/compiere/util/Ini.java
index 16c0556f0a..797042b89e 100644
--- a/org.adempiere.base/src/org/compiere/util/Ini.java
+++ b/org.adempiere.base/src/org/compiere/util/Ini.java
@@ -38,21 +38,20 @@ import org.compiere.model.ModelValidationEngine;
import org.compiere.model.SystemProperties;
/**
- * Load and Save INI Settings from property file
- * Initiated in Adempiere.startup
- * Settings activated in ALogin.getIni
+ * Load and Save INI Settings from property file (idempiere.properties).
+ * Initiated in Adempiere.startup.
*
* @author Jorg Janke
* @version $Id$
*
- * @author Teo Sarca, www.arhipac.ro
+ * @author Teo Sarca, www.arhipac.ro
*
FR [ 1658127 ] Select charset encoding on import
*
FR [ 2406123 ] Ini.saveProperties fails if target directory does not exist
*/
public final class Ini implements Serializable
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -8936090051638559660L;
@@ -223,7 +222,7 @@ public final class Ini implements Serializable
/**
* Save INI parameters to disk
- * @param tryUserHome get user home first
+ * @param tryUserHome true to try user home first
*/
@SuppressWarnings("deprecation")
public static void saveProperties (boolean tryUserHome)
@@ -371,7 +370,7 @@ public final class Ini implements Serializable
} // deleteProperties
/**
- * Load property and set to default, if not existing
+ * Load property and set to default, if not exists
*
* @param key Key
* @param defaultValue Default Value
@@ -400,7 +399,7 @@ public final class Ini implements Serializable
*
* Can be overwritten by -DPropertyFile=myFile allowing multiple
* configurations / property files.
- * @param tryUserHome get user home first
+ * @param tryUserHome true to try user home first, ignore for server
* @return file name
*/
public static String getFileName (boolean tryUserHome)
@@ -426,15 +425,13 @@ public final class Ini implements Serializable
return base + IDEMPIERE_PROPERTY_FILE;
} // getFileName
-
- /**************************************************************************
+ /**
* Set Property
* @param key Key
* @param value Value
*/
public static void setProperty (String key, String value)
{
- // log.finer(key + "=" + value);
if (s_prop == null)
s_prop = new Properties();
if (key.equals(P_WARNING) || key.equals(P_WARNING_de))
@@ -490,7 +487,6 @@ public final class Ini implements Serializable
return "";
//
String value = SecureEngine.decrypt(retStr, 0);
- // log.finer(key + "=" + value);
if (value == null)
return "";
return value;
@@ -515,7 +511,7 @@ public final class Ini implements Serializable
return getProperty (P_CACHE_WINDOW).equals("Y");
} // isCacheWindow
- /**************************************************************************
+ /**
* Get Properties
*
* @return Ini properties
@@ -543,9 +539,6 @@ public final class Ini implements Serializable
return buf.toString();
} // toString
-
- /*************************************************************************/
-
/** System environment prefix */
public static final String ENV_PREFIX = "env.";
/** System Property Value of IDEMPIERE_HOME */
@@ -604,7 +597,7 @@ public final class Ini implements Serializable
} // isLoaded
/**
- * Get Idempiere Home from Environment
+ * Get iDempiere Home from Environment
* @return idempiereHome or null
*/
public static String getAdempiereHome()
@@ -633,7 +626,7 @@ public final class Ini implements Serializable
} // getAdempiereHome
/**
- * Set Idempiere Home
+ * Set iDempiere Home
* @param idempiereHome IDEMPIERE_HOME
*/
public static void setAdempiereHome (String idempiereHome)
@@ -643,7 +636,7 @@ public final class Ini implements Serializable
} // setAdempiereHome
/**
- * Find Idempiere Home
+ * Find iDempiere Home
* @return idempiere home or null
*/
public static String findAdempiereHome()
@@ -651,11 +644,12 @@ public final class Ini implements Serializable
return getAdempiereHome();
} // findAdempiereHome
- /**************************************************************************
+ /**
* Get Window Dimension
* @param AD_Window_ID window no
* @return dimension or null
*/
+ @Deprecated
public static Dimension getWindowDimension(int AD_Window_ID)
{
String key = "WindowDim" + AD_Window_ID;
@@ -682,6 +676,7 @@ public final class Ini implements Serializable
* @param AD_Window_ID window
* @param windowDimension dimension - null to remove
*/
+ @Deprecated
public static void setWindowDimension(int AD_Window_ID, Dimension windowDimension)
{
String key = "WindowDim" + AD_Window_ID;
@@ -699,6 +694,7 @@ public final class Ini implements Serializable
* @param AD_Window_ID window id
* @return location or null
*/
+ @Deprecated
public static Point getWindowLocation(int AD_Window_ID)
{
String key = "WindowLoc" + AD_Window_ID;
@@ -725,6 +721,7 @@ public final class Ini implements Serializable
* @param AD_Window_ID window
* @param windowLocation location - null to remove
*/
+ @Deprecated
public static void setWindowLocation(int AD_Window_ID, Point windowLocation)
{
String key = "WindowLoc" + AD_Window_ID;
@@ -741,6 +738,7 @@ public final class Ini implements Serializable
* Get Divider Location
* @return location
*/
+ @Deprecated
public static int getDividerLocation()
{
String key = "Divider";
@@ -761,6 +759,7 @@ public final class Ini implements Serializable
* Set Divider Location
* @param dividerLocation location
*/
+ @Deprecated
public static void setDividerLocation(int dividerLocation)
{
String key = "Divider";
@@ -796,11 +795,20 @@ public final class Ini implements Serializable
return Charset.defaultCharset();
}
+ /**
+ * Get property file name
+ * @return property file name
+ */
public static String getPropertyFileName()
{
return s_propertyFileName;
}
+ /**
+ * Get value of a secret variable
+ * @param secretVar secret variable name
+ * @return value of secret variable
+ */
public static String getVar(String secretVar) {
String cmd = getUtilsCmd("getVar");
String[] command = new String[] {
@@ -811,6 +819,11 @@ public final class Ini implements Serializable
return retValue;
}
+ /**
+ * Set value of secret variable
+ * @param secretVar
+ * @param secretValue
+ */
public static void setVar(String secretVar, String secretValue) {
String cmd = getUtilsCmd("setVar");
String[] command = new String[] {
@@ -821,6 +834,11 @@ public final class Ini implements Serializable
runCommand(command);
}
+ /**
+ * Get absolute path of script
+ * @param script command script file name
+ * @return absolute path of script
+ */
private static String getUtilsCmd(String script) {
File utilsFolder = new File(getAdempiereHome() + File.separator + "utils");
if (! utilsFolder.exists()) {
@@ -841,6 +859,11 @@ public final class Ini implements Serializable
return cmd.getAbsolutePath();
}
+ /**
+ * Run shell command
+ * @param command
+ * @return command output
+ */
public static String runCommand(String[] command) {
StringBuilder msg = new StringBuilder();
try {
diff --git a/org.adempiere.base/src/org/compiere/util/KeyNamePair.java b/org.adempiere.base/src/org/compiere/util/KeyNamePair.java
index 19ab5a42d7..2e9bf5ed34 100644
--- a/org.adempiere.base/src/org/compiere/util/KeyNamePair.java
+++ b/org.adempiere.base/src/org/compiere/util/KeyNamePair.java
@@ -17,7 +17,7 @@
package org.compiere.util;
/**
- * (Numeric) Key Name Pair
+ * Key Name Pair (Integer key and string name)
*
* @author Jorg Janke
* @version $Id: KeyNamePair.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
@@ -25,14 +25,14 @@ package org.compiere.util;
public final class KeyNamePair extends NamePair
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 6347385376010388473L;
public static final KeyNamePair EMPTY = new KeyNamePair(-1, "");
/**
- * Constructor KeyValue Pair -
+ * Constructor KeyNamePair Pair -
* @param key Key (-1 is considered as null)
* @param name string representation
*/
@@ -55,9 +55,9 @@ public final class KeyNamePair extends NamePair
} // getKey
/**
- * Get ID (key as String)
+ * Get ID (convert key to string)
*
- * @return String value of key or null if -1
+ * @return String value of key or null if key value is -1
*/
public String getID()
{
@@ -66,12 +66,12 @@ public final class KeyNamePair extends NamePair
return String.valueOf(m_key);
} // getID
-
/**
* Equals
* @param obj object
* @return true if equal
*/
+ @Override
public boolean equals(Object obj)
{
if (obj instanceof KeyNamePair)
@@ -87,9 +87,10 @@ public final class KeyNamePair extends NamePair
} // equals
/**
- * Return Hashcode of key
- * @return hascode
+ * Return key as hash code of object
+ * @return key value
*/
+ @Override
public int hashCode()
{
return m_key;
diff --git a/org.adempiere.base/src/org/compiere/util/Language.java b/org.adempiere.base/src/org/compiere/util/Language.java
index f6ee6a328f..d3d6a9173c 100644
--- a/org.adempiere.base/src/org/compiere/util/Language.java
+++ b/org.adempiere.base/src/org/compiere/util/Language.java
@@ -40,13 +40,10 @@ import org.compiere.print.MPrintPaper;
public class Language implements Serializable
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 7039775951366180267L;
- /**
- *
- */
/**************************************************************************
* Languages
* http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt
@@ -96,8 +93,8 @@ public class Language implements Serializable
return s_languages.get(index);
} // getLanguage
- /**************************************************************************
- * Get Language.
+ /**
+ * Get Language.
* If language does not exist, create it on the fly assuming that it is valid
* @param langInfo either language (en) or locale (en-US) or display name
* @return Name (e.g. Deutsch)
@@ -182,6 +179,9 @@ public class Language implements Serializable
return s_baseLanguage;
} // getLanguage
+ /**
+ * Set base language from AD_Language table
+ */
private static void setBaseLanguage() {
isBaseLanguageSet = true;
String baselang = DB.getSQLValueStringEx(null, "SELECT AD_Language FROM AD_Language WHERE IsActive='Y' AND IsBaseLanguage = 'Y'");
@@ -190,6 +190,10 @@ public class Language implements Serializable
}
}
+ /**
+ * Set baselang as base language
+ * @param baselang
+ */
public static void setBaseLanguage(String baselang) {
Language lang = getLanguage(baselang);
s_baseLanguage = lang;
@@ -229,9 +233,9 @@ public class Language implements Serializable
} // getBase
/**
- * Get Supported Locale
+ * Get Locale from langInfo
* @param langInfo either language (en) or locale (en-US) or display name
- * @return Supported Locale
+ * @return Locale
*/
public static Locale getLocale (String langInfo)
{
@@ -239,7 +243,7 @@ public class Language implements Serializable
} // getLocale
/**
- * Get Supported Language
+ * Get Language from langInfo
* @param langInfo either language (en) or locale (en-US) or display name
* @return AD_Language (e.g. en-US)
*/
@@ -249,7 +253,7 @@ public class Language implements Serializable
} // getAD_Language
/**
- * Get Supported Language
+ * Get Language code from locale
* @param locale Locale
* @return AD_Language (e.g. en-US)
*/
@@ -267,7 +271,7 @@ public class Language implements Serializable
} // getLocale
/**
- * Get Language Name
+ * Get Language Name from langInfo
* @param langInfo either language (en) or locale (en-US) or display name
* @return Language Name (e.g. English)
*/
@@ -297,9 +301,8 @@ public class Language implements Serializable
retValue[i] = s_languages.get(i).getName();
return retValue;
} // getNames
-
- /**************************************************************************
+ /**
* Get Current Login Language
* @return login language
*/
@@ -320,9 +323,8 @@ public class Language implements Serializable
if (log.isLoggable(Level.CONFIG)) log.config(language.toString());
}
} // setLanguage
-
- /**************************************************************************
+ /**
* Define Language
* @param name - displayed value, e.g. English
* @param AD_Language - the code of system supported language, e.g. en_US
@@ -347,7 +349,7 @@ public class Language implements Serializable
} // Language
/**
- * Define Language with A4 and default decimal point and date format
+ * Define Language with AD_Language and default decimal point and date format
* @param name - displayed value, e.g. English
* @param AD_Language - the code of system supported language, e.g. en_US
* (might be different than Locale - i.e. if the system does not support the language)
@@ -489,7 +491,7 @@ public class Language implements Serializable
} // isBaseLanguage
/**
- * Set Date Pattern.
+ * Set Date Format Pattern.
* The date format is not checked for correctness
* @param javaDatePattern for details see java.text.SimpleDateFormat,
* format must be able to be converted to database date format by
@@ -514,9 +516,7 @@ public class Language implements Serializable
} // setDateFormat
/**
- * Get (Short) Date Format.
- * The date format must parseable by org.compiere.grid.ed.MDocDate
- * i.e. leading zero for date and month
+ * Get (Short) Date Format.
* @return date format MM/dd/yyyy - dd.MM.yyyy
*/
public synchronized SimpleDateFormat getDateFormat()
@@ -559,7 +559,6 @@ public class Language implements Serializable
/**
* Get Date Time Format.
- * Used for Display only
* @return Date Time format MMM d, yyyy h:mm:ss a z -or- dd.MM.yyyy HH:mm:ss z
* -or- j nnn aaaa, H' ?????? 'm' ????'
*/
@@ -567,13 +566,11 @@ public class Language implements Serializable
{
SimpleDateFormat retValue = (SimpleDateFormat)DateFormat.getDateTimeInstance
(DateFormat.MEDIUM, DateFormat.LONG, m_locale);
- // if (log.isLoggable(Level.FINER)) log.finer("Pattern=" + retValue.toLocalizedPattern() + ", Loc=" + retValue.toLocalizedPattern());
return retValue;
} // getDateTimeFormat
/**
* Get Time Format.
- * Used for Display only
* @return Time format h:mm:ss z or HH:mm:ss z
*/
public SimpleDateFormat getTimeFormat()
@@ -583,7 +580,7 @@ public class Language implements Serializable
} // getTimeFormat
/**
- * Get Database Date Pattern.
+ * Get Database Date Pattern.
* Derive from date pattern (make upper case and replace month as word with MM)
* @return date pattern
*/
@@ -621,6 +618,7 @@ public class Language implements Serializable
* String Representation
* @return string representation
*/
+ @Override
public String toString()
{
StringBuilder sb = new StringBuilder("Language=[");
@@ -636,6 +634,7 @@ public class Language implements Serializable
* Hash Code
* @return hashcode
*/
+ @Override
public int hashCode()
{
return m_AD_Language.hashCode();
@@ -647,6 +646,7 @@ public class Language implements Serializable
* @param obj compare
* @return true if AD_Language is the same
*/
+ @Override
public boolean equals(Object obj)
{
if (obj instanceof Language)
@@ -657,19 +657,5 @@ public class Language implements Serializable
}
return false;
} // equals
-
- /**************************************************************************
- * Test
- * @param args ignored
- */
- public static void main(String[] args)
- {
- System.out.println(Locale.TRADITIONAL_CHINESE);
- System.out.println(Locale.TAIWAN);
- System.out.println(Locale.SIMPLIFIED_CHINESE);
- System.out.println(Locale.CHINESE);
- System.out.println(Locale.PRC);
- }
-
} // Language
diff --git a/org.adempiere.base/src/org/compiere/util/Login.java b/org.adempiere.base/src/org/compiere/util/Login.java
index 6562c40c8e..0274f0cc87 100644
--- a/org.adempiere.base/src/org/compiere/util/Login.java
+++ b/org.adempiere.base/src/org/compiere/util/Login.java
@@ -56,7 +56,6 @@ import org.compiere.model.PO;
import org.compiere.model.Query;
import org.compiere.model.SystemIDs;
-
/**
* Login Manager
*
@@ -75,10 +74,18 @@ public class Login
private boolean isPasswordExpired;
private boolean isSSOLogin = false;
+ /**
+ * Get login error message
+ * @return login error message
+ */
public String getLoginErrMsg() {
return loginErrMsg;
}
+ /**
+ * Is user password has expire
+ * @return true if user password has expire
+ */
public boolean isPasswordExpired() {
return isPasswordExpired;
}
@@ -124,8 +131,8 @@ public class Login
} // testInit
/**
- * Java Version Test
- * @param isClient client connection
+ * Java Version Test, only use for client environment
+ * @param isClient client environment
* @return true if Java Version is OK
*/
public static boolean isJavaOK (boolean isClient)
@@ -148,10 +155,8 @@ public class Login
log.severe(msg.toString());
return false;
} // isJavaOK
-
- /**************************************************************************
- * Login
+ /**
* @param ctx context
*/
public Login (Properties ctx)
@@ -456,14 +461,13 @@ public class Login
//long ms = System.currentTimeMillis () - start;
return retValue;
} // getRoles
-
- /**************************************************************************
- * Load Clients.
+ /**
+ * Get Clients.
*
* Sets Role info in context and loads its clients
* @param role role information
- * @return list of valid client KeyNodePairs or null if in error
+ * @return list of valid client KeyNamePairs or null if has error
*/
public KeyNamePair[] getClients (KeyNamePair role)
{
@@ -473,8 +477,6 @@ public class Login
loginErrMsg = null;
isPasswordExpired = false;
- // s_log.fine("loadClients - Role: " + role.toStringX());
-
ArrayList list = new ArrayList();
KeyNamePair[] retValue = null;
String sql = "SELECT DISTINCT r.UserLevel, r.ConnectionProfile, " // 1/2
@@ -486,7 +488,7 @@ public class Login
PreparedStatement pstmt = null;
ResultSet rs = null;
- // get Role details
+ // get clients
try
{
pstmt = DB.prepareStatement(sql, null);
@@ -536,22 +538,21 @@ public class Login
} // getClients
/**
- * Load Organizations.
+ * Get Organizations.
*
- * Sets Client info in context and loads its organization, the role has access to
- * @param rol
+ * Sets Client info in context and loads organizations that the role has access to
+ * @param rol role
* @return list of valid Org KeyNodePairs or null if in error
*/
public KeyNamePair[] getOrgs (KeyNamePair rol)
{
if (rol == null)
- throw new IllegalArgumentException("Rol missing");
+ throw new IllegalArgumentException("Role missing");
if (Env.getContext(m_ctx,Env.AD_CLIENT_ID).length() == 0) // could be number 0
throw new UnsupportedOperationException("Missing Context #AD_Client_ID");
int AD_Client_ID = Env.getContextAsInt(m_ctx,Env.AD_CLIENT_ID);
int AD_User_ID = Env.getContextAsInt(m_ctx, Env.AD_USER_ID);
- // s_log.fine("Client: " + client.toStringX() + ", AD_Role_ID=" + AD_Role_ID);
// get Client details for role
ArrayList list = new ArrayList();
@@ -642,10 +643,10 @@ public class Login
} // getOrgs
/**
- * Get Orgs - Add Summary Org
- * @param list list
+ * Get Orgs - Add child Org of Summary Org
+ * @param list list to add to
* @param Summary_Org_ID summary org
- * @param Summary_Name name
+ * @param Summary_Name name of summary org, for logging purpose only
* @param role role
* @see org.compiere.model.MRole#loadOrgAccessAdd
*/
@@ -680,7 +681,6 @@ public class Login
rs = pstmt.executeQuery ();
while (rs.next ())
{
- //int AD_Client_ID = rs.getInt(1);
int AD_Org_ID = rs.getInt(2);
String Name = rs.getString(3);
boolean summary = "Y".equals(rs.getString(4));
@@ -706,9 +706,8 @@ public class Login
}
} // getOrgAddSummary
-
/**
- * Load Warehouses
+ * Get Warehouses
* @param org organization
* @return Array of Warehouse Info
*/
@@ -717,13 +716,11 @@ public class Login
if (org == null)
throw new IllegalArgumentException("Org missing");
- // s_log.info("loadWarehouses - Org: " + org.toStringX());
-
ArrayList list = new ArrayList();
KeyNamePair[] retValue = null;
String sql = "SELECT M_Warehouse_ID, Name FROM M_Warehouse "
+ "WHERE AD_Org_ID=? AND IsActive='Y' "
- + " AND "+I_M_Warehouse.COLUMNNAME_IsInTransit+"='N' " // do not show in tranzit warehouses - teo_sarca [ 2867246 ]
+ + " AND "+I_M_Warehouse.COLUMNNAME_IsInTransit+"='N' " // do not show in transit warehouses - teo_sarca [ 2867246 ]
+ "ORDER BY Name";
PreparedStatement pstmt = null;
ResultSet rs = null;
@@ -770,8 +767,8 @@ public class Login
/**
* Validate Login
- * @param org log-in org
- * @return error message
+ * @param org login org
+ * @return error message or null
*/
public String validateLogin (KeyNamePair org)
{
@@ -1028,7 +1025,7 @@ public class Login
} // loadPreferences
/**
- * Load preferences based on user
+ * Load user preferences
*/
public void loadUserPreferences(){
MUserPreference userPreference = MUserPreference.getUserPreference(Env.getAD_User_ID(m_ctx), Env.getAD_Client_ID(m_ctx));
@@ -1250,17 +1247,24 @@ public class Login
* Get SSO Principal
* @return principal
*/
+ @Deprecated
public Principal getPrincipal()
{
return null;
} // getPrincipal
+ /**
+ * Get clients
+ * @param app_user login id
+ * @param app_pwd login password
+ * @return list of accessible client
+ */
public KeyNamePair[] getClients(String app_user, String app_pwd) {
return getClients(app_user, app_pwd, null);
}
/**
- * Validate Client Login. Sets Context with login info
+ * Validate Client Login. Sets Context with login info.
*
* @param app_user user id
* @param app_pwd password
@@ -1274,7 +1278,7 @@ public class Login
/**
* Validate Client Login.
- * Sets Context with login info
+ * Sets Context with login info.
* @param app_user user id
* @param app_pwd password
* @param roleTypes comma separated list of the role types allowed to login (NULL can be added)
@@ -1398,7 +1402,7 @@ public class Login
return null;
}
- log.log(Level.FINE ,users.size() + " matched user found for :" + app_user);
+ if (log.isLoggable(Level.FINE)) log.log(Level.FINE ,users.size() + " matched user found for :" + app_user);
int MAX_ACCOUNT_LOCK_MINUTES = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_ACCOUNT_LOCK_MINUTES, 0);
int MAX_INACTIVE_PERIOD_DAY = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_INACTIVE_PERIOD_DAY, 0);
int MAX_PASSWORD_AGE = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_PASSWORD_AGE_DAY, 0);
@@ -1413,7 +1417,7 @@ public class Login
}
clientsValidated.add(user.getAD_Client_ID());
boolean valid = false;
- // authenticated by ldap
+ // authenticated by ldap or sso
if (authenticated || isSSOLogin) {
valid = true;
} else {
@@ -1628,7 +1632,7 @@ public class Login
/**
* Get the tenant from the login text when using login prefix
* @param app_user
- * @return
+ * @return tenant from app_user or null
*/
private static String getAppTenant(String app_user) {
String appTenant = null;
@@ -1644,7 +1648,7 @@ public class Login
/**
* Get the user from the login text
* @param app_user
- * @return
+ * @return user id
*/
public static String getAppUser(String app_user) {
String appUser = app_user;
@@ -1657,14 +1661,20 @@ public class Login
return appUser;
}
+ /**
+ * Get roles of user
+ * @param app_user
+ * @param client
+ * @return roles of user
+ */
public KeyNamePair[] getRoles(String app_user, KeyNamePair client) {
return getRoles(app_user, client, null);
}
- /**************************************************************************
- * Load Roles.
+ /**
+ * Get Roles.
*
- * Sets Client info in context and loads its roles
+ * Sets Client info in context and loads its roles.
* @param client client information
* @param roleTypes comma separated list of the role types allowed to login (NULL can be added)
* @return list of valid roles KeyNodePairs or null if in error
@@ -1747,8 +1757,11 @@ public class Login
return retValue;
} // getRoles
- public KeyNamePair[] getClients() {
-
+ /**
+ * Get clients
+ * @return clients
+ */
+ public KeyNamePair[] getClients() {
if (Env.getContext(m_ctx,Env.AD_USER_ID).length() == 0){
throw new UnsupportedOperationException("Missing Context #AD_User_ID");
}
diff --git a/org.adempiere.base/src/org/compiere/util/MSort.java b/org.adempiere.base/src/org/compiere/util/MSort.java
index 04d1492d0e..9ddb731bd6 100644
--- a/org.adempiere.base/src/org/compiere/util/MSort.java
+++ b/org.adempiere.base/src/org/compiere/util/MSort.java
@@ -38,7 +38,7 @@ import java.util.Comparator;
public final class MSort implements Comparator
- * The function returns true for b and false for a/b.
+ * The function returns true for b and false for a/c.
* @param start_1 start (1)
* @param end_1 not included end (1)
* @param start_2 start (2)
@@ -218,7 +217,7 @@ public class TimeUtil
} // inRange
/**
- * Is start..end on one of the days ?
+ * Is start..end include one of the days ?
* @param start start day
* @param end end day (not including)
* @param OnMonday true if OK
@@ -319,7 +318,7 @@ public class TimeUtil
* Is it the same day and same hour
* @param one day/time
* @param two compared day/time
- * @return true if one and two is same day and hour
+ * @return true if one and two is same day and same hour
*/
static public boolean isSameHour (Timestamp one, Timestamp two)
{
@@ -414,7 +413,7 @@ public class TimeUtil
} // getDaysBetween
/**
- * Return Day + offset (truncates)
+ * Return Day + offset (truncate the time portion)
* @param day Day
* @param offset day offset
* @return Day + offset at 00:00
@@ -461,12 +460,11 @@ public class TimeUtil
return new Timestamp (cal.getTimeInMillis());
} // addMinutes
-
- /**************************************************************************
+ /**
* Format Elapsed Time
* @param start start time or null for now
* @param end end time or null for now
- * @return formatted time string 1'23:59:59.999
+ * @return formatted elapsed time string 1'23:59:59.999
*/
public static String formatElapsed (Timestamp start, Timestamp end)
{
@@ -487,7 +485,7 @@ public class TimeUtil
/**
* Format Elapsed Time until now
* @param start start time
- * @return formatted time string 1'23:59:59.999
+ * @return formatted elapsed time string 1'23:59:59.999
*/
public static String formatElapsed (Timestamp start)
{
@@ -500,8 +498,8 @@ public class TimeUtil
/**
* Format Elapsed Time
- * @param elapsedMS time in ms
- * @return formatted time string 1'23:59:59.999 - d'hh:mm:ss.xxx
+ * @param elapsedMS elapsed time in ms
+ * @return formatted elapsed time string 1'23:59:59.999 - d'hh:mm:ss.xxx
*/
public static String formatElapsed (long elapsedMS)
{
@@ -553,9 +551,8 @@ public class TimeUtil
return "0" + s;
} // get2digits
-
/**
- * Is it valid today?
+ * Is today a valid date ?
* @param validFrom valid from
* @param validTo valid to
* @return true if today is between validFrom and validTo
@@ -588,10 +585,10 @@ public class TimeUtil
} // isValid
/**
- * Max date
+ * Get the greater of ts1 and ts2
* @param ts1 p1
* @param ts2 p2
- * @return max time
+ * @return the greater of ts1 and ts2
*/
public static Timestamp max (Timestamp ts1, Timestamp ts2)
{
@@ -665,7 +662,7 @@ public class TimeUtil
} // trunc
/**
- * Returns timestamp by combining the date part from dateTime and time part form timeSlot.
+ * Returns timestamp by combining the date part from dateTime and time part form timeSlot.
* If timeSlot is null, then first millisecond of the day will be used (if end == false)
* or last millisecond of the day (if end == true).
*
@@ -708,8 +705,6 @@ public class TimeUtil
return new Timestamp(gc.getTimeInMillis());
}
-
-// ARHIPAC: TEO: ADDITION ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/**
* [ ARHIPAC ] Gets calendar instance of given date
* @param date calendar initialization date; if null, the current date is used
@@ -745,7 +740,7 @@ public class TimeUtil
} // getMonthFirstDay
/**
- * [ ARHIPAC ] Return Day + offset (truncates)
+ * [ ARHIPAC ] Return Day + offset (truncate the time portion)
* @param day Day; if null current time will be used
* @param offset months offset
* @return Day + offset (time will be 00:00)
@@ -768,7 +763,7 @@ public class TimeUtil
} // addMonths
/**
- *
+ * Get number of months between start and end
* @param start
* @param end
* @return number of months between start and end
@@ -783,7 +778,7 @@ public class TimeUtil
}
/**
- *
+ * Add n days to startDate, skipping non business day.
* @param startDate
* @param nbDays number of days
* @param clientID AD_Client_ID
@@ -803,9 +798,9 @@ public class TimeUtil
}
/**
- *
+ * Get number of business day between startDate and endDate
* @param startDate
- * @param endDate
+ * @param endDate (not inclusive)
* @param clientID
* @param trxName
* @return number of business days between 2 dates for the country based on current default country
@@ -816,7 +811,7 @@ public class TimeUtil
}
/**
- *
+ * Get number of business day between startDate and endDate
* @param startDate
* @param endDate
* @param clientID
@@ -830,9 +825,9 @@ public class TimeUtil
}
/**
- *
+ * Get number of business day between startDate and endDate
* @param startDate
- * @param endDate
+ * @param endDate (not inclusive)
* @param clientID
* @param countryID
* @param trxName
@@ -844,7 +839,7 @@ public class TimeUtil
}
/**
- *
+ * Get number of business day between startDate and endDate
* @param startDate
* @param endDate
* @param clientID
diff --git a/org.adempiere.base/src/org/compiere/util/Trace.java b/org.adempiere.base/src/org/compiere/util/Trace.java
index 9a0b96abe4..394b6dd2d4 100644
--- a/org.adempiere.base/src/org/compiere/util/Trace.java
+++ b/org.adempiere.base/src/org/compiere/util/Trace.java
@@ -20,7 +20,7 @@ import java.util.ArrayList;
import java.util.logging.Level;
/**
- * Trace Information
+ * Stack Trace Information
*
* @author Jorg Janke
* @version $Id: Trace.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
@@ -102,7 +102,6 @@ public class Trace
public static void printStack (boolean adempiereOnly, boolean first9only)
{
Throwable t = new Throwable();
- // t.printStackTrace();
int counter = 0;
StackTraceElement[] elements = t.getStackTrace();
for (int i = 1; i < elements.length; i++)
diff --git a/org.adempiere.base/src/org/compiere/util/Trx.java b/org.adempiere.base/src/org/compiere/util/Trx.java
index cbe40526a5..3a284b1592 100644
--- a/org.adempiere.base/src/org/compiere/util/Trx.java
+++ b/org.adempiere.base/src/org/compiere/util/Trx.java
@@ -38,6 +38,7 @@ import org.compiere.model.MSysConfig;
import org.compiere.model.PO;
/**
+ *
* @author Jorg Janke
* @author Low Heng Sin
- * - added rollback(boolean) and commit(boolean) [20070105]
- * - remove unnecessary use of savepoint
- * - use UUID for safer transaction name generation
+ *
added rollback(boolean) and commit(boolean) [20070105]
+ *
remove unnecessary use of savepoint
+ *
use UUID for safer transaction name generation
* @author Teo Sarca, http://www.arhipac.ro
*
FR [ 2080217 ] Implement TrxRunnable
*
BF [ 2876927 ] Oracle JDBC driver problem
@@ -88,6 +89,7 @@ public class Trx
* @param con Connection
* @return Transaction or null
*/
+ @Deprecated
public static Trx get (String trxName, boolean createNew, Connection con)
{
if (trxName == null || trxName.length() == 0)
@@ -102,11 +104,11 @@ public class Trx
return retValue;
} // get
- /** Transaction Cache */
+ /** Transaction Cache */
private static final Map s_cache = new ConcurrentHashMap();
-
+ /** Transaction timeout monitor */
private static final Trx.TrxMonitor s_monitor = new Trx.TrxMonitor();
-
+ /** Transaction event listeners */
private ConcurrentLinkedQueue listeners = new ConcurrentLinkedQueue();
protected Exception trace;
@@ -115,6 +117,9 @@ public class Trx
private boolean m_changesMadeByEventListener = false;
+ /**
+ * Start transaction timeout monitor (run every 5 minutes)
+ */
public static void startTrxMonitor()
{
Adempiere.getThreadPoolExecutor().scheduleWithFixedDelay(s_monitor, 5, 5, TimeUnit.MINUTES);
@@ -123,7 +128,7 @@ public class Trx
/**
* Create unique Transaction Name
* @param prefix optional prefix
- * @return unique name
+ * @return unique transaction name
*/
public static String createTrxName (String prefix)
{
@@ -157,31 +162,30 @@ public class Trx
{
return createTrxName(null);
} // createTrxName
-
-
- /**************************************************************************
+
+ /**
* Transaction Constructor
* @param trxName unique name
*/
private Trx (String trxName)
{
- this (trxName, null);
- } // Trx
-
- /**
- * Transaction Constructor
- * @param trxName unique name
- * @param con optional connection ( ignore for remote transaction )
- * */
- private Trx (String trxName, Connection con)
- {
- // log.info (trxName);
setTrxName (trxName);
if (trxName.length() < 36)
{
String msg = "Illegal transaction name format, not prefix+UUID or UUID: " + trxName;
log.log(Level.SEVERE, msg, new Exception(msg));
}
+ } // Trx
+
+ /**
+ * Transaction Constructor
+ * @param trxName unique name
+ * @param con optional connection ( ignore for remote transaction )
+ */
+ @Deprecated
+ private Trx (String trxName, Connection con)
+ {
+ this(trxName);
setConnection (con);
} // Trx
@@ -270,7 +274,7 @@ public class Trx
/**
* Get Name
- * @return name
+ * @return transaction name
*/
public String getTrxName()
{
@@ -304,7 +308,7 @@ public class Trx
/**
* Transaction is Active
- * @return true if transaction active
+ * @return true if transaction is active
*/
public boolean isActive()
{
@@ -345,6 +349,10 @@ public class Trx
return false;
} // rollback
+ /**
+ * Fire after rollback event
+ * @param success
+ */
private void fireAfterRollbackEvent(boolean success) {
for(TrxEventListener l : listeners) {
l.afterRollback(this, success);
@@ -365,7 +373,7 @@ public class Trx
}
/**
- * Rollback
+ * Rollback to save point
* @param savepoint
* @return true if success, false if failed or transaction already rollback
* @throws SQLException
@@ -430,6 +438,10 @@ public class Trx
return false;
} // commit
+ /**
+ * Fire after commit event
+ * @param success
+ */
private void fireAfterCommitEvent(boolean success) {
for(TrxEventListener l : listeners) {
l.afterCommit(this, success);
@@ -452,9 +464,9 @@ public class Trx
}
}
-
/**
- * Rollback and End Transaction, Close Connection and Throws an Exception
+ * Rollback and End Transaction, Close Connection and Throws an Exception.
+ * This is means to be called by the timeout monitor and developer usually shouldn't call this directly.
* @return true if success
*/
public boolean rollbackAndCloseOnTimeout() {
@@ -533,10 +545,13 @@ public class Trx
trace = null;
m_active = false;
fireAfterCloseEvent();
- log.config(m_trxName);
+ if (log.isLoggable(Level.CONFIG)) log.config(m_trxName);
return true;
} // close
+ /**
+ * Fire after close event
+ */
private void fireAfterCloseEvent() {
for(TrxEventListener l : listeners) {
l.afterClose(this);
@@ -544,8 +559,8 @@ public class Trx
}
/**
- *
- * @param name
+ * Set transaction save point
+ * @param name optional savepoint name
* @return Savepoint
* @throws SQLException
*/
@@ -565,10 +580,20 @@ public class Trx
private Savepoint m_lastWFSavepoint = null;
+ /**
+ * Set last workflow save point.
+ * For workflow engine use, developer usually shouldn't call this method directly.
+ * @param savepoint
+ */
public synchronized void setLastWFSavepoint(Savepoint savepoint) {
m_lastWFSavepoint = savepoint;
}
+ /**
+ * Get last set workflow save point.
+ * For workflow engine use, developer usually shouldn't call this method directly.
+ * @return last set workflow save point or null
+ */
public synchronized Savepoint getLastWFSavepoint() {
return m_lastWFSavepoint;
}
@@ -605,6 +630,7 @@ public class Trx
* String Representation
* @return info
*/
+ @Override
public String toString()
{
StringBuilder sb = new StringBuilder("Trx[");
@@ -615,7 +641,8 @@ public class Trx
} // toString
/**
- * @return Trx[]
+ * Get register transactions
+ * @return array of register transactions
*/
public static Trx[] getOpenTransactions()
{
@@ -644,7 +671,7 @@ public class Trx
}
/**
- * Execute runnable object using provided transaction.
+ * Execute runnable object using provided transaction.
* If execution fails, database operations will be rolled back.
*
* Example:
@@ -712,6 +739,7 @@ public class Trx
}
/**
+ * Get transaction timout value
* @return trx timoue value in second
*/
public int getTimeout() {
@@ -719,7 +747,7 @@ public class Trx
}
/**
- * set transaction timeout ( in seconds )
+ * set transaction timeout value ( in seconds )
* @param timeout
*/
public void setTimeout(int timeout) {
@@ -727,17 +755,26 @@ public class Trx
}
/**
- *
+ * Add transaction event listener
* @param listener
*/
public void addTrxEventListener(TrxEventListener listener) {
listeners.add(listener);
}
+ /**
+ * Remove transaction event listener
+ * @param listener
+ * @return true if listener is found and remove
+ */
public boolean removeTrxEventListener(TrxEventListener listener) {
return listeners.remove(listener);
}
+ /**
+ * Get stack trace save
+ * @return stack trace save or empty string
+ */
public String getStrackTrace()
{
if (trace != null)
@@ -753,18 +790,26 @@ public class Trx
}
}
+ /**
+ * Get transaction display name. Fall back to transaction name if display name is not set.
+ * @return display name or name
+ */
public String getDisplayName()
{
return m_displayName != null ? m_displayName : m_trxName;
}
+ /**
+ * Set transaction display name
+ * @param displayName
+ */
public void setDisplayName(String displayName)
{
m_displayName = displayName;
}
/**
- * Indicate additional db changes have been made by event listener
+ * Indicate additional DB changes have been made by a transaction event listener
* @param changesMade
*/
public void setChangesMadeByEventListener(boolean changesMade)
@@ -773,7 +818,7 @@ public class Trx
}
/**
- *
+ * Is there additional changes make by transaction event listener
* @return true if event listener(s) has flag that additional db changes have been made
*/
public boolean hasChangesMadeByEventListener()
@@ -781,6 +826,7 @@ public class Trx
return m_changesMadeByEventListener;
}
+ /** Transaction timeout monitor class */
static class TrxMonitor implements Runnable
{
@@ -809,6 +855,10 @@ public class Trx
}
}
+ /**
+ * @param trxName
+ * @return true if trxName is a local transaction
+ */
private boolean isLocalTrx(String trxName)
{
return trxName == null
diff --git a/org.adempiere.base/src/org/compiere/util/TrxEventListener.java b/org.adempiere.base/src/org/compiere/util/TrxEventListener.java
index 155cb8d294..7f5a5df8c7 100644
--- a/org.adempiere.base/src/org/compiere/util/TrxEventListener.java
+++ b/org.adempiere.base/src/org/compiere/util/TrxEventListener.java
@@ -14,11 +14,25 @@
package org.compiere.util;
/**
+ * Transaction event listener interface
* @author hengsin
- *
*/
public interface TrxEventListener {
+ /**
+ * After commit event
+ * @param trx
+ * @param success
+ */
public void afterCommit(Trx trx, boolean success);
+ /**
+ * After rollback event
+ * @param trx
+ * @param success
+ */
public void afterRollback(Trx trx, boolean success);
+ /**
+ * After close event
+ * @param trx
+ */
public void afterClose(Trx trx);
}
diff --git a/org.adempiere.base/src/org/compiere/util/TrxRunnable.java b/org.adempiere.base/src/org/compiere/util/TrxRunnable.java
index 5071965f26..d99b4f02c2 100644
--- a/org.adempiere.base/src/org/compiere/util/TrxRunnable.java
+++ b/org.adempiere.base/src/org/compiere/util/TrxRunnable.java
@@ -14,12 +14,16 @@
package org.compiere.util;
/**
- * Defines an object that can be ran into an transaction,
+ * Defines an action that should be ran inside an transaction,
* using {@link Trx#run(TrxRunnable)} or {@link Trx#run(String, TrxRunnable)} methods.
*
* @author Teo Sarca, http://www.arhipac.ro
*/
public interface TrxRunnable
{
+ /**
+ * Run action inside trx denote by trxName
+ * @param trxName
+ */
public void run(String trxName);
}
diff --git a/org.adempiere.base/src/org/compiere/util/Util.java b/org.adempiere.base/src/org/compiere/util/Util.java
index 694657b224..f1f6555342 100644
--- a/org.adempiere.base/src/org/compiere/util/Util.java
+++ b/org.adempiere.base/src/org/compiere/util/Util.java
@@ -54,7 +54,7 @@ import com.lowagie.text.pdf.PdfReader;
import com.lowagie.text.pdf.PdfWriter;
/**
- * General Utilities
+ * General Utility methods
*
* @author Jorg Janke
* @version $Id: Util.java,v 1.3 2006/07/30 00:52:23 jjanke Exp $
@@ -92,7 +92,6 @@ public class Util
pos = oldValue.indexOf(oldPart);
}
retValue.append(oldValue);
- // log.fine( "Env.replace - " + value + " - Old=" + oldPart + ", New=" + newPart + ", Result=" + retValue.toString());
return retValue.toString();
} // replace
@@ -116,7 +115,6 @@ public class Util
return out.toString();
} // removeCRLF
-
/**
* Clean - Remove all white spaces
* @param in in
@@ -145,7 +143,6 @@ public class Util
return out.toString();
} // cleanWhitespace
-
/**
* Mask HTML content.
* i.e. replace characters with &values;
@@ -211,10 +208,10 @@ public class Util
} // maskHTML
/**
- * Get the number of occurances of countChar in string.
+ * Get the number of occurrences of countChar in string.
* @param string String to be searched
* @param countChar to be counted character
- * @return number of occurances
+ * @return number of occurrences
*/
public static int getCount (String string, char countChar)
{
@@ -231,7 +228,7 @@ public class Util
} // getCount
/**
- * Is String Empty
+ * Is String Empty or null
* @param str string
* @return true if >= 1 char
*/
@@ -241,7 +238,7 @@ public class Util
} // isEmpty
/**
- * Is String Empty
+ * Is String Empty or null
* @param str string
* @param trimWhitespaces trim whitespaces
* @return true if >= 1 char
@@ -268,9 +265,9 @@ public class Util
return text;
}
- /**************************************************************************
+ /**
* Find index of search character in str.
- * This ignores content in () and 'texts'
+ * This ignores content in () and quoted text ('texts').
* @param str string
* @param search search character
* @return index or -1 if not found
@@ -282,7 +279,7 @@ public class Util
/**
* Find index of search characters in str.
- * This ignores content in () and 'texts'
+ * This ignores content in () and quoted text ('texts').
* @param str string
* @param search1 first search character
* @param search2 second search character (or)
@@ -317,7 +314,7 @@ public class Util
/**
* Find index of search character in str.
- * This ignores content in () and 'texts'
+ * This ignores content in () and quoted text ('texts')
* @param str string
* @param search search character
* @return index or -1 if not found
@@ -352,8 +349,7 @@ public class Util
return -1;
} // findIndexOf
-
- /**************************************************************************
+ /**
* Return Hex String representation of byte b
* @param b byte
* @return Hex
@@ -379,12 +375,11 @@ public class Util
byte lo = (byte) (c & 0xff);
return toHex(hi) + toHex(lo);
} // toHex
-
- /**************************************************************************
- * Init Cap Words With Spaces
+ /**
+ * Capitalize first character of a word
* @param in string
- * @return init cap
+ * @return Capitalize string
*/
public static String initCap (String in)
{
@@ -407,11 +402,10 @@ public class Util
}
return new String (data);
} // initCap
-
- /**************************************************************************
- * Return a Iterator with only the relevant attributes.
- * Fixes implementation in AttributedString, which returns everything
+ /**
+ * Return a Iterator with only the relevant attributes.
+ * Fixes implementation in AttributedString, which returns everything.
* @param aString attributed string
* @param relevantAttributes relevant attributes
* @return iterator
@@ -421,7 +415,6 @@ public class Util
{
AttributedCharacterIterator iter = aString.getIterator();
Set> set = iter.getAllAttributeKeys();
- // System.out.println("AllAttributeKeys=" + set);
if (set.size() == 0)
return iter;
// Check, if there are unwanted attributes
@@ -457,15 +450,12 @@ public class Util
}
}
}
- // else
- // System.out.println("Unwanted: " + att);
}
return aString.getIterator();
} // getIterator
-
/**
- * Dump a Map (key=value) to out
+ * Dump a Map (key=value) to standard out
* @param map Map
*/
static public void dump (Map map)
@@ -562,7 +552,7 @@ public class Util
/**
* Is 8 Bit
* @param str string
- * @return true if string contains chars > 255
+ * @return true if string doesn't contains chars > 255
*/
public static boolean is8Bit (String str)
{
@@ -573,7 +563,6 @@ public class Util
{
if (cc[i] > 255)
{
- // System.out.println("Not 8 Bit - " + str);
return false;
}
}
@@ -601,8 +590,8 @@ public class Util
/**
* Trim to max character length
* @param str string
- * @param length max (incl) character length
- * @return string
+ * @param length max (inclusive) character length
+ * @return trim string
*/
public static String trimLength (String str, int length)
{
@@ -671,7 +660,7 @@ public class Util
} // trimSize
/**
- * String diacritics from given string
+ * Strip diacritics from given string
* @param s original string
* @return string without diacritics
*/
@@ -694,6 +683,11 @@ public class Util
/* */
}
+ /**
+ * Set time portion to zero.
+ * @param ts
+ * @return truncated timestamp
+ */
public static Timestamp removeTime(Timestamp ts) {
Calendar cal = Calendar.getInstance();
cal.setTime(ts);
@@ -705,13 +699,13 @@ public class Util
}
/**
- *
- * @param pdfList
- * @param outFile
- * @throws IOException
- * @throws DocumentException
- * @throws FileNotFoundException
- */
+ * Merge pdf files
+ * @param pdfList list of pdf file to merge
+ * @param outFile merged output file
+ * @throws IOException
+ * @throws DocumentException
+ * @throws FileNotFoundException
+ */
public static void mergePdf(List pdfList, File outFile) throws IOException,
DocumentException, FileNotFoundException {
Document document = null;
@@ -755,7 +749,7 @@ public class Util
}
/**
- * Make the filename correct (updating all unauthorized characters to safe ones)
+ * Make filename safe (updating all unauthorized characters to safe ones)
* @param input the filename to check
* @returns the correct filename
*/
@@ -773,6 +767,7 @@ public class Util
private final static String UUID_REGEX="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}";
/**
+ * Is value a valid UUID string
* @param value
* @return true if value is a uuid identifier
*/
@@ -782,6 +777,7 @@ public class Util
}
/**
+ * Is running from Eclipse
* @return true if there is a directory org.adempiere.base within AdempiereHome (is the case when executed from Eclipse)
*/
public static boolean isDeveloperMode() {
diff --git a/org.adempiere.base/src/org/compiere/util/ValueNamePair.java b/org.adempiere.base/src/org/compiere/util/ValueNamePair.java
index 619c89a24f..dfba0ba8b6 100644
--- a/org.adempiere.base/src/org/compiere/util/ValueNamePair.java
+++ b/org.adempiere.base/src/org/compiere/util/ValueNamePair.java
@@ -17,7 +17,7 @@
package org.compiere.util;
/**
- * (String) Value Name Pair
+ * Value Name Pair (String key and name)
*
* @author Jorg Janke
* @version $Id: ValueNamePair.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
@@ -25,14 +25,14 @@ package org.compiere.util;
public final class ValueNamePair extends NamePair
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -8315081335749462163L;
public static final ValueNamePair EMPTY = new ValueNamePair("", "");
/**
- * Construct KeyValue Pair
+ * Construct ValueNamePair Pair
* @param value value
* @param name string representation
*/
@@ -44,12 +44,12 @@ public final class ValueNamePair extends NamePair
m_value = "";
} // ValueNamePair
- /** The Value */
+ /** The Key Value */
private String m_value = null;
/**
- * Get Value
- * @return Value
+ * Get Key Value
+ * @return Key Value
*/
public String getValue()
{
@@ -57,7 +57,7 @@ public final class ValueNamePair extends NamePair
} // getValue
/**
- * Get ID
+ * Get String ID
* @return Value
*/
public String getID()
@@ -72,6 +72,7 @@ public final class ValueNamePair extends NamePair
* @param obj Object
* @return true, if equal
*/
+ @Override
public boolean equals(Object obj)
{
if (obj instanceof ValueNamePair)
@@ -85,7 +86,6 @@ public final class ValueNamePair extends NamePair
return false;
} // equals
-
/**
* Get the Object representation of the value
* @return value
@@ -99,10 +99,11 @@ public final class ValueNamePair extends NamePair
* Return Hashcode of value
* @return hascode
*/
+ @Override
public int hashCode()
{
return m_value.hashCode();
} // hashCode
-} // KeyValuePair
+}
diff --git a/org.adempiere.base/src/org/compiere/util/package-info.java b/org.adempiere.base/src/org/compiere/util/package-info.java
new file mode 100644
index 0000000000..5cec8227e1
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/util/package-info.java
@@ -0,0 +1,27 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide implementation for conversion of amount to word.
+ * Provide global cache, server log, JDBC interface, Transaction and Email implementation.
+ */
+package org.compiere.util;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/compiere/wf/DocWorkflowManager.java b/org.adempiere.base/src/org/compiere/wf/DocWorkflowManager.java
index 9f90516501..d0c06ee1c0 100644
--- a/org.adempiere.base/src/org/compiere/wf/DocWorkflowManager.java
+++ b/org.adempiere.base/src/org/compiere/wf/DocWorkflowManager.java
@@ -29,7 +29,6 @@ import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Evaluator;
-
/**
* Document Workflow Manager
*
@@ -39,7 +38,7 @@ import org.compiere.util.Evaluator;
public class DocWorkflowManager implements DocWorkflowMgr
{
/**
- * Get Document Workflow Manager
+ * Get the singleton Document Workflow Manager instance
* @return mgr
*/
public static DocWorkflowManager get()
@@ -58,8 +57,7 @@ public class DocWorkflowManager implements DocWorkflowMgr
private volatile static DocWorkflowManager s_mgr = null;
/** Logger */
private static CLogger log = CLogger.getCLogger(DocWorkflowManager.class);
-
-
+
/**
* Doc Workflow Manager
*/
@@ -119,7 +117,7 @@ public class DocWorkflowManager implements DocWorkflowMgr
}
// Start Workflow
- log.fine(logic);
+ if (log.isLoggable(Level.FINE)) log.fine(logic);
int AD_Process_ID = PROCESS_AD_WORKFLOW_DOCVALUE; // HARDCODED
ProcessInfo pi = new ProcessInfo (wf.getName(), AD_Process_ID,
AD_Table_ID, document.get_ID());
@@ -195,12 +193,12 @@ public class DocWorkflowManager implements DocWorkflowMgr
return retValue;
} // testStart
-
-
+
/**
- * String Representation
- * @return info
- */
+ * String Representation
+ * @return info
+ */
+ @Override
public String toString()
{
StringBuilder sb = new StringBuilder("DocWorkflowManager[");
diff --git a/org.adempiere.base/src/org/compiere/wf/MWFActivity.java b/org.adempiere.base/src/org/compiere/wf/MWFActivity.java
index 3655ea1a98..bbc30a2128 100644
--- a/org.adempiere.base/src/org/compiere/wf/MWFActivity.java
+++ b/org.adempiere.base/src/org/compiere/wf/MWFActivity.java
@@ -71,9 +71,8 @@ import org.compiere.util.TrxEventListener;
import org.compiere.util.Util;
/**
- * Workflow Activity Model.
- * Controlled by WF Process:
- * set Node - startWork
+ * Extended Workflow Activity Model for AD_WF_Activity.
+ * Controlled by WF Process: set Node - startWork
*
* @author Jorg Janke
* @author Silvano Trinchero, www.freepath.it
@@ -83,7 +82,7 @@ import org.compiere.util.Util;
public class MWFActivity extends X_AD_WF_Activity implements Runnable
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -9119089506977887142L;
@@ -95,7 +94,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
* @param AD_Table_ID table
* @param Record_ID record
* @param activeOnly if true only not processed records are returned
- * @return activity
+ * @return activities
*/
public static MWFActivity[] get (Properties ctx, int AD_Table_ID, int Record_ID, boolean activeOnly)
{
@@ -119,11 +118,11 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
} // get
/**
- * Get Active Info
+ * Get info of active activities
* @param ctx context
* @param AD_Table_ID table
* @param Record_ID record
- * @return activity summary
+ * @return info of active activities (separated by new line character)
*/
public static String getActiveInfo (Properties ctx, int AD_Table_ID, int Record_ID)
{
@@ -142,13 +141,12 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
return sb.toString();
} // getActivityInfo
-
/**
- * UUID based Constructor
- * @param ctx Context
- * @param AD_WF_Activity_UU UUID key
- * @param trxName Transaction
- */
+ * UUID based Constructor
+ * @param ctx Context
+ * @param AD_WF_Activity_UU UUID key
+ * @param trxName Transaction
+ */
public MWFActivity(Properties ctx, String AD_WF_Activity_UU, String trxName) {
super(ctx, AD_WF_Activity_UU, trxName);
if (Util.isEmpty(AD_WF_Activity_UU))
@@ -156,7 +154,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
m_state = new StateEngine (getWFState());
}
- /**************************************************************************
+ /**
* Standard Constructor
* @param ctx context
* @param AD_WF_Activity_ID id
@@ -274,7 +272,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
/** List of email recipients */
private ArrayList m_emails = new ArrayList();
- /**************************************************************************
+ /**
* Get State
* @return state
*/
@@ -284,10 +282,10 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
} // getState
/**
- * Set Activity State.
+ * Set Activity State.
* It also validates the new state and if is valid,
* then create event audit and call {@link MWFProcess#checkActivities(String, PO)}
- * @param WFState
+ * @param WFState StateEngine.STATE_*
*/
@Override
public void setWFState (String WFState)
@@ -341,13 +339,11 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
return m_state.isClosed();
} // isClosed
-
- /**************************************************************************
- * Update Event Audit
+ /**
+ * Update Event Audit ({@link MWFEventAudit})
*/
private void updateEventAudit()
{
- // log.fine("");
getEventAudit();
m_audit.setTextMsg(getTextMsg());
m_audit.setWFState(getWFState());
@@ -371,7 +367,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
} // updateEventAudit
/**
- * Get/Create Event Audit
+ * Get/Create new Event Audit
* @return event
*/
public MWFEventAudit getEventAudit()
@@ -386,8 +382,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
return m_audit;
} // getEventAudit
-
- /**************************************************************************
+ /**
* Get Persistent Object in Transaction
* @param trx transaction
* @return po
@@ -431,7 +426,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
} // getPO_AD_Client_ID
/**
- * Get Attribute Value (based on Node) of PO
+ * Get Attribute Value (AD_Column_ID of {@link MWFNode}) of PO
* @return Attribute Value or null
*/
public Object getAttributeValue()
@@ -478,11 +473,10 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
return true;
} // isSOTrx
-
- /**************************************************************************
+ /**
* Set AD_WF_Node_ID.
- * (Re)Set to Not Started
- * @param AD_WF_Node_ID now node
+ * (Re)Set state to Not Started.
+ * @param AD_WF_Node_ID new node
*/
@Override
public void setAD_WF_Node_ID (int AD_WF_Node_ID)
@@ -538,7 +532,6 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
return getNode().getHelp(true);
} // getNodeHelp
-
/**
* Is this an user Approval step?
* @return true if User Approval
@@ -566,7 +559,6 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
return getNode().isUserChoice();
} // isUserChoice
-
/**
* Set Text Msg (add to existing)
* @param TextMsg
@@ -634,7 +626,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
/**
* Get WF State text
- * @return state text
+ * @return workflow state text
*/
public String getWFStateText ()
{
@@ -664,8 +656,8 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
} // setResponsible
/**
- * Get Responsible
- * @return responsible
+ * Get workflow Responsible
+ * @return workflow responsible
*/
public MWFResponsible getResponsible()
{
@@ -683,7 +675,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
} // isInvoker
/**
- * Get Approval User.
+ * Get Approval User.
* If the returned user is the same, the document is approved.
* @param AD_User_ID starting User
* @param C_Currency_ID currency
@@ -771,7 +763,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
}
else
{
- log.fine("No Supervisor");
+ if (log.isLoggable(Level.FINE)) log.fine("No Supervisor");
MOrg org = MOrg.get (getCtx(), AD_Org_ID);
MOrgInfo orgInfo = org.getInfo();
// Get Org Supervisor
@@ -782,7 +774,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
}
else
{
- log.fine("No Org Supervisor");
+ if (log.isLoggable(Level.FINE)) log.fine("No Org Supervisor");
// Get Parent Org Supervisor
if (orgInfo.getParent_Org_ID() != 0)
{
@@ -800,7 +792,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
ownDocument = false;
} // while there is a user to approve
- log.fine("No user found");
+ if (log.isLoggable(Level.FINE)) log.fine("No user found");
return -1;
} // getApproval
@@ -873,17 +865,16 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
return amtaccum;
}
- /**************************************************************************
- * Execute Work.
- * Called from MWFProcess.startNext
- * Feedback to Process via setWFState -> checkActivities
+ /**
+ * Run activity.
+ * Called from MWFProcess.startNext.
+ * Feedback to Process via setWFState -> checkActivities.
*/
public void run()
{
if (log.isLoggable(Level.INFO)) log.info ("Node=" + getNode());
m_newValue = null;
-
Trx trx = null;
boolean localTrx = false;
if (get_TrxName() == null)
@@ -1041,7 +1032,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
}
/**
- * Perform Work.
+ * Perform action of current workflow node.
* Set Text Msg.
* @param trx transaction
* @return true if completed, false otherwise
@@ -1378,7 +1369,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
} // performWork
/**
- * Set Variable
+ * Set value to PO
* @param value new Value
* @param displayType display type
* @param textMsg optional Message
@@ -1463,43 +1454,6 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
public boolean setUserChoice (int AD_User_ID, String value, int displayType,
String textMsg) throws Exception
{
- // Check if user approves own document when a role is reponsible
- /*
- * 2007-06-08, matthiasO.
- * The following sequence makes sure that only users in roles which
- * have the 'Approve own document flag' set can set the user choice
- * of 'Y' (approve) or 'N' (reject).
- * IMHO this is against the meaning of 'Approve own document': Why
- * should a user who is faced with the task of approving documents
- * generally be required to have the ability to approve his OWN
- * documents? If the document to approve really IS his own document
- * this will be respected when trying to find an approval user in
- * the call to getApprovalUser(...) below.
- */
- /*
- if (getNode().isUserApproval() && getPO() instanceof DocAction)
- {
- DocAction doc = (DocAction)m_po;
- MUser user = new MUser (getCtx(), AD_User_ID, null);
- MRole[] roles = user.getRoles(m_po.getAD_Org_ID());
- boolean canApproveOwnDoc = false;
- for (int r = 0; r < roles.length; r++)
- {
- if (roles[r].isCanApproveOwnDoc())
- {
- canApproveOwnDoc = true;
- break;
- } // found a role which allows to approve own document
- }
- if (!canApproveOwnDoc)
- {
- String info = user.getName() + " cannot approve own document " + doc;
- addTextMsg(info);
- log.fine(info);
- return false; // ignore
- }
- }*/
-
setWFState (StateEngine.STATE_Running);
setAD_User_ID(AD_User_ID);
Trx trx = ( get_TrxName() != null ) ? Trx.get(get_TrxName(), false) : null;
@@ -1602,7 +1556,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
} // setUserChoice
/**
- * Forward To
+ * Forward to user, usually for approval
* @param AD_User_ID user
* @param textMsg text message
* @return true if forwarded
@@ -1662,7 +1616,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
/**
- * Fill Parameter
+ * Fill Report/Process Parameters
* @param pInstance process instance
* @param trx transaction
*/
@@ -1757,6 +1711,11 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
} // instance parameter loop
} // fillParameter
+ /**
+ * Parse attribute value of node parameter
+ * @param nPara node parameter
+ * @return parsed value
+ */
private Object parseNodeParaAttribute(MWFNodePara nPara)
{
String variableName = nPara.getAttributeValue();
@@ -1803,7 +1762,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
return value;
}
- /*********************************
+ /**
* Send EMail
*/
private void sendEMail()
@@ -1890,7 +1849,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
} // sendEMail
/**
- * Send actual EMail
+ * Send EMail
* @param client client
* @param AD_User_ID user
* @param email email string
@@ -1947,9 +1906,9 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
}
} // sendEMail
- /**************************************************************************
+ /**
* Get Process Activity (Event) History
- * @return history
+ * @return history in html format
*/
public String getHistoryHTML()
{
@@ -1959,7 +1918,6 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
for (int i = 0; i < events.length; i++)
{
MWFEventAudit audit = events[i];
- // sb.append("
");
sb.append("
");
sb.append(format.format(audit.getCreated()))
.append(" ")
@@ -1991,9 +1949,8 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
return sb;
} // getHTMLpart
-
- /**************************************************************************
- * Does the underlying PO (!) object have a PDF Attachment
+ /**
+ * Does the underlying PO object has a PDF Attachment
* @return true if there is a pdf attachment
*/
public boolean isPdfAttachment()
@@ -2004,7 +1961,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
} // isPDFAttachment
/**
- * Get PDF Attachment of underlying PO (!) object
+ * Get PDF Attachment of underlying PO object
* @return pdf data or null
*/
public byte[] getPdfAttachment()
@@ -2014,11 +1971,11 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
return m_po.getPdfAttachment();
} // getPdfAttachment
-
/**
* String Representation
* @return info
*/
+ @Override
public String toString ()
{
StringBuilder sb = new StringBuilder ("MWFActivity[");
@@ -2098,7 +2055,11 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
}
return sb.toString();
} // getSummary
-
+
+ /**
+ * Set up transaction event listener to set workflow state to StateEngine.STATE_Completed in the transaction
+ * after commit event.
+ */
private void prepareCommitEvent()
{
Trx trx = null;
@@ -2111,8 +2072,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
trx.addTrxEventListener(new TrxListener(activity));
}
-
-
+ /** Transaction event listener to update workflow activity in the after commit event */
static class TrxListener implements TrxEventListener {
private MWFActivity activity;
@@ -2140,8 +2100,8 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
}
/**
- * Where to get the pending activities related to a User (unprocessed and suspended)
- * The where returned requires the AD_User_ID parameter 5 times, and then AD_Client_ID
+ * Get where clause to get the pending activities related to a User (unprocessed and suspended).
+ * The where clause return requires the AD_User_ID parameter 5 times, and then AD_Client_ID.
* @return Where Clause
*/
public static String getWhereUserPendingActivities() {
@@ -2160,11 +2120,15 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
+ " WHERE AD_WF_Activity.AD_WF_Responsible_ID=r.AD_WF_Responsible_ID AND r.ResponsibleType='R' AND ur.AD_User_ID=? AND ur.isActive = 'Y')" // #4
///* Manual Responsible */
+ " OR EXISTS (SELECT * FROM AD_WF_ActivityApprover r "
- + " WHERE AD_WF_Activity.AD_WF_Activity_ID=r.AD_WF_Activity_ID AND r.AD_User_ID=? AND r.isActive = 'Y')"
- + ") AND AD_WF_Activity.AD_Client_ID=?"; // #5
+ + " WHERE AD_WF_Activity.AD_WF_Activity_ID=r.AD_WF_Activity_ID AND r.AD_User_ID=? AND r.isActive = 'Y')" // #5
+ + ") AND AD_WF_Activity.AD_Client_ID=?"; // #6
return where;
}
+ /**
+ * Get process message
+ * @return process message
+ */
public String getProcessMsg() {
if (m_process == null)
diff --git a/org.adempiere.base/src/org/compiere/wf/MWFBlock.java b/org.adempiere.base/src/org/compiere/wf/MWFBlock.java
index b5e2e7efb8..b54a456930 100644
--- a/org.adempiere.base/src/org/compiere/wf/MWFBlock.java
+++ b/org.adempiere.base/src/org/compiere/wf/MWFBlock.java
@@ -24,13 +24,14 @@ import org.compiere.util.Env;
import org.idempiere.cache.ImmutableIntPOCache;
import org.idempiere.cache.ImmutablePOSupport;
-
/**
* Work Flow Commitment Block
*
* @author Jorg Janke
* @version $Id: MWFBlock.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
+ * @deprecated not fully implemented, marked as inactive in dictionary
*/
+@Deprecated
public class MWFBlock extends X_AD_WF_Block implements ImmutablePOSupport
{
/**
diff --git a/org.adempiere.base/src/org/compiere/wf/MWFEventAudit.java b/org.adempiere.base/src/org/compiere/wf/MWFEventAudit.java
index 3cdd077b37..9023b92930 100644
--- a/org.adempiere.base/src/org/compiere/wf/MWFEventAudit.java
+++ b/org.adempiere.base/src/org/compiere/wf/MWFEventAudit.java
@@ -26,23 +26,22 @@ import org.compiere.model.X_AD_WF_EventAudit;
import org.compiere.util.Env;
/**
- * Workflow Event Audit
+ * Extended Workflow Event Audit model for AD_WF_EventAudit
*
* @author Jorg Janke
* @version $Id: MWFEventAudit.java,v 1.3 2006/07/30 00:51:06 jjanke Exp $
*
- * @author Teo Sarca, SC ARHIPAC SERVICE SRL
+ * @author Teo Sarca, SC ARHIPAC SERVICE SRL
*
BF [ 1801842 ] DB connection fix and improvements for concurrent threads
*
BF [ 1943723 ] WF Activity History is not translated
*/
public class MWFEventAudit extends X_AD_WF_EventAudit
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 3760514881823970823L;
-
/**
* Get Event Audit for node
* @param ctx context
@@ -51,18 +50,19 @@ public class MWFEventAudit extends X_AD_WF_EventAudit
* @return event audit or null
* @deprecated Deprecated since 3.4.0. Use instead {@link #get(Properties, int, int, String)}
*/
+ @Deprecated(forRemoval = true, since = "11")
public static MWFEventAudit[] get (Properties ctx, int AD_WF_Process_ID, int AD_WF_Node_ID)
{
return get(ctx, AD_WF_Process_ID, AD_WF_Node_ID, null);
}
/**
- * Get Event Audit for node
+ * Get Event Audits for node
* @param ctx context
* @param AD_WF_Process_ID process
* @param AD_WF_Node_ID optional node
* @param trxName
- * @return event audit or null
+ * @return event audits or null
*/
public static MWFEventAudit[] get (Properties ctx, int AD_WF_Process_ID, int AD_WF_Node_ID, String trxName)
{
@@ -91,35 +91,35 @@ public class MWFEventAudit extends X_AD_WF_EventAudit
* @return event audit or null
* @deprecated Deprecated since 3.4.0. Use instead {@link #get(Properties, int, String)}
*/
+ @Deprecated(forRemoval = true, since = "11")
public static MWFEventAudit[] get (Properties ctx, int AD_WF_Process_ID)
{
return get(ctx, AD_WF_Process_ID, null);
}
/**
- * Get Event Audit for node
+ * Get Event Audits for node
* @param ctx context
* @param AD_WF_Process_ID process
* @param trxName
- * @return event audit or null
+ * @return event audits or null
*/
public static MWFEventAudit[] get (Properties ctx, int AD_WF_Process_ID, String trxName)
{
return get(ctx, AD_WF_Process_ID, 0, trxName);
} // get
-
-
+
/**
- * UUID based Constructor
- * @param ctx Context
- * @param AD_WF_EventAudit_UU UUID key
- * @param trxName Transaction
- */
+ * UUID based Constructor
+ * @param ctx Context
+ * @param AD_WF_EventAudit_UU UUID key
+ * @param trxName Transaction
+ */
public MWFEventAudit(Properties ctx, String AD_WF_EventAudit_UU, String trxName) {
super(ctx, AD_WF_EventAudit_UU, trxName);
}
- /**************************************************************************
+ /**
* Standard Constructor
* @param ctx context
* @param AD_WF_EventAudit_ID id
@@ -131,7 +131,7 @@ public class MWFEventAudit extends X_AD_WF_EventAudit
} // MWFEventAudit
/**
- * Load Cosntructors
+ * Load Constructor
* @param ctx context
* @param rs result set
* @param trxName transaction
diff --git a/org.adempiere.base/src/org/compiere/wf/MWFNextCondition.java b/org.adempiere.base/src/org/compiere/wf/MWFNextCondition.java
index 46611008d2..b648bfdc7f 100644
--- a/org.adempiere.base/src/org/compiere/wf/MWFNextCondition.java
+++ b/org.adempiere.base/src/org/compiere/wf/MWFNextCondition.java
@@ -31,27 +31,27 @@ import org.idempiere.cache.ImmutablePOSupport;
import org.compiere.model.X_AD_WF_NextCondition;
/**
- * Workflow Transition Condition
+ * Extended Workflow Transition Condition model for AD_WF_NextCondition
*
* @author Jorg Janke
* @version $Id: MWFNextCondition.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
*
- * @author Teo Sarca, SC ARHIPAC SERVICE SRL
+ * @author Teo Sarca, SC ARHIPAC SERVICE SRL
*
BF [ 1943720 ] WF Next Condition: handling boolean values is poor
*/
public class MWFNextCondition extends X_AD_WF_NextCondition implements ImmutablePOSupport
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 3119863973003103716L;
/**
- * UUID based Constructor
- * @param ctx Context
- * @param AD_WF_NextCondition_UU UUID key
- * @param trxName Transaction
- */
+ * UUID based Constructor
+ * @param ctx Context
+ * @param AD_WF_NextCondition_UU UUID key
+ * @param trxName Transaction
+ */
public MWFNextCondition(Properties ctx, String AD_WF_NextCondition_UU, String trxName) {
super(ctx, AD_WF_NextCondition_UU, trxName);
}
@@ -79,7 +79,7 @@ public class MWFNextCondition extends X_AD_WF_NextCondition implements Immutable
} // MWFNextCondition
/**
- *
+ * Copy constructor
* @param copy
*/
public MWFNextCondition(MWFNextCondition copy)
@@ -88,7 +88,7 @@ public class MWFNextCondition extends X_AD_WF_NextCondition implements Immutable
}
/**
- *
+ * Copy constructor
* @param ctx
* @param copy
*/
@@ -98,7 +98,7 @@ public class MWFNextCondition extends X_AD_WF_NextCondition implements Immutable
}
/**
- *
+ * Copy constructor
* @param ctx
* @param copy
* @param trxName
@@ -192,12 +192,13 @@ public class MWFNextCondition extends X_AD_WF_NextCondition implements Immutable
} // evaluate
/**
- * F3P: Decode value string, for each substring enclosed in @:
- * COL= remaining value is interpreted as a column of the associated record
+ * Decode value string.
+ * If sValue start with @COL=, remaining text is interpreted as a column of the associated record.
+ * Otherwise, parse sValue for context and PO variable (i.e resolve @tag@ variables).
*
* @param sValue value to be decoded
* @param po PO model object bound to the activity
- * @return
+ * @return decoded value
*/
protected String getDecodedValue(String sValue, PO po)
{
@@ -224,9 +225,9 @@ public class MWFNextCondition extends X_AD_WF_NextCondition implements Immutable
/**
* Compare Number
- * @param valueObj comparator
+ * @param valueObj source value for comparison
* @param value1 first value
- * @param value2 second value
+ * @param value2 second value for between comparison (OPERATION_X)
* @return true if operation
*/
private boolean compareNumber (Number valueObj, String value1, String value2)
@@ -299,9 +300,9 @@ public class MWFNextCondition extends X_AD_WF_NextCondition implements Immutable
/**
* Compare String
- * @param valueObj comparator
+ * @param valueObj source value for comparison
* @param value1S first value
- * @param value2S second value
+ * @param value2S second value for between comparison (OPERATION_X)
* @return true if operation
*/
private boolean compareString (Object valueObj, String value1S, String value2S)
@@ -341,9 +342,9 @@ public class MWFNextCondition extends X_AD_WF_NextCondition implements Immutable
/**
* Compare Boolean
- * @param valueObj comparator
+ * @param valueObj source value for comparison
* @param value1S first value
- * @param value2S second value
+ * @param value2S ignore
* @return true if operation
*/
private boolean compareBoolean (Boolean valueObj, String value1S, String value2S)
@@ -365,6 +366,7 @@ public class MWFNextCondition extends X_AD_WF_NextCondition implements Immutable
* String Representation
* @return info
*/
+ @Override
public String toString ()
{
StringBuilder sb = new StringBuilder ("MWFNextCondition[");
diff --git a/org.adempiere.base/src/org/compiere/wf/MWFNode.java b/org.adempiere.base/src/org/compiere/wf/MWFNode.java
index 85e81adf03..2c5b8c3749 100644
--- a/org.adempiere.base/src/org/compiere/wf/MWFNode.java
+++ b/org.adempiere.base/src/org/compiere/wf/MWFNode.java
@@ -43,7 +43,7 @@ import org.idempiere.cache.ImmutablePOCache;
import org.idempiere.cache.ImmutablePOSupport;
/**
- * Workflow Node Model
+ * Extended Workflow Node Model for AD_WF_Node
*
* @author Jorg Janke
* @version $Id: MWFNode.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
@@ -56,7 +56,7 @@ import org.idempiere.cache.ImmutablePOSupport;
public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 3328770995394833132L;
@@ -108,14 +108,13 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
/** Cache */
private static ImmutablePOCache s_cache = new ImmutablePOCache (Table_Name, 50);
-
-
+
/**
- * UUID based Constructor
- * @param ctx Context
- * @param AD_WF_Node_UU UUID key
- * @param trxName Transaction
- */
+ * UUID based Constructor
+ * @param ctx Context
+ * @param AD_WF_Node_UU UUID key
+ * @param trxName Transaction
+ */
public MWFNode(Properties ctx, String AD_WF_Node_UU, String trxName) {
super(ctx, AD_WF_Node_UU, trxName);
if (Util.isEmpty(AD_WF_Node_UU))
@@ -126,7 +125,7 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
}
}
- /**************************************************************************
+ /**
* Standard Constructor - save to cache
* @param ctx context
* @param AD_WF_Node_ID id
@@ -194,7 +193,7 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
} // MWFNode
/**
- *
+ * Copy constructor
* @param copy
*/
public MWFNode(MWFNode copy)
@@ -203,7 +202,7 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
}
/**
- *
+ * Copy constructor
* @param ctx
* @param copy
*/
@@ -213,7 +212,7 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
}
/**
- *
+ * Copy constructor
* @param ctx
* @param copy
* @param trxName
@@ -260,7 +259,7 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
} // setClientOrg
/**
- * Load Next
+ * Load Next Nodes into {@link #m_next}
*/
private void loadNext()
{
@@ -328,7 +327,7 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
} // getNextNodeCount
/**
- * Get the transitions
+ * Get next nodes for transitions
* @param AD_Client_ID for client
* @return array of next nodes
*/
@@ -346,9 +345,8 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
list.toArray(retValue);
return retValue;
} // getNextNodes
-
- /**************************************************************************
+ /**
* Get Name
* @param translated translated
* @return Name
@@ -415,7 +413,7 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
/**
* Get Action Info
- * @return info
+ * @return action info text
*/
public String getActionInfo()
{
@@ -447,13 +445,13 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
return "Sleep:WaitTime=" + getWaitTime();
return "??";
} // getActionInfo
-
-
+
/**
* Get Attribute Name
* @see org.compiere.model.X_AD_WF_Node#getAttributeName()
* @return Attribute Name
*/
+ @Override
public String getAttributeName ()
{
if (getAD_Column_ID() == 0)
@@ -465,11 +463,10 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
setAttributeName(getColumn().getColumnName());
return super.getAttributeName ();
} // getAttributeName
-
-
+
/**
* Get Column
- * @return column if valid
+ * @return column or null
*/
public MColumn getColumn()
{
@@ -519,8 +516,7 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
return true;
return false;
} // isUserManual
-
-
+
/**
* Get Duration in ms
* @return duration in ms
@@ -550,8 +546,8 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
} // getLimitMS
/**
- * Get Duration CalendarField
- * @return Calendar.MINUTE, etc.
+ * Get Duration Calendar Field
+ * @return Calendar Field (Calendar.MINUTE, etc.)
*/
public int getDurationCalendarField()
{
@@ -561,7 +557,7 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
/**
* Calculate Dynamic Priority
* @param seconds second after created
- * @return dyn prio
+ * @return Dynamic Priority
*/
public int calculateDynamicPriority (int seconds)
{
@@ -586,9 +582,9 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
return change.intValue();
} // calculateDynamicPriority
- /**************************************************************************
- * Get Parameters
- * @return array of parameters
+ /**
+ * Get Node Parameters
+ * @return array of node parameters
*/
public MWFNodePara[] getParameters()
{
@@ -621,6 +617,7 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
* String Representation
* @return info
*/
+ @Override
public String toString ()
{
StringBuilder sb = new StringBuilder ("MWFNode[");
@@ -745,12 +742,6 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
return false;
}
}
-// else if (action.equals(ACTION_UserWorkbench))
-// {
-// && getAD_Workbench_ID() == 0)
-// log.saveError("FillMandatory", Msg.getElement(getCtx(), "AD_Workbench_ID"));
-// return false;
-// }
return true;
} // beforeSave
@@ -783,7 +774,7 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
/**
* Check if the workflow node is valid for given date
* @param date
- * @return true if valid
+ * @return true if node is valid for the given date
*/
public boolean isValidFromTo(Timestamp date)
{
@@ -814,4 +805,4 @@ public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
return this;
}
-} // M_WFNext
+}
diff --git a/org.adempiere.base/src/org/compiere/wf/MWFNodeNext.java b/org.adempiere.base/src/org/compiere/wf/MWFNodeNext.java
index 9304ec99a3..35c23b31f1 100644
--- a/org.adempiere.base/src/org/compiere/wf/MWFNodeNext.java
+++ b/org.adempiere.base/src/org/compiere/wf/MWFNodeNext.java
@@ -32,7 +32,7 @@ import org.compiere.util.Util;
import org.idempiere.cache.ImmutablePOSupport;
/**
- * Workflow Node Next - Transition
+ * Extended Workflow Node Next model for AD_WF_NodeNext
*
* @author Jorg Janke
* @version $Id: MWFNodeNext.java,v 1.3 2006/10/06 00:42:24 jjanke Exp $
@@ -40,16 +40,16 @@ import org.idempiere.cache.ImmutablePOSupport;
public class MWFNodeNext extends X_AD_WF_NodeNext implements ImmutablePOSupport
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 5965306487040965994L;
/**
- * UUID based Constructor
- * @param ctx Context
- * @param AD_WF_NodeNext_UU UUID key
- * @param trxName Transaction
- */
+ * UUID based Constructor
+ * @param ctx Context
+ * @param AD_WF_NodeNext_UU UUID key
+ * @param trxName Transaction
+ */
public MWFNodeNext(Properties ctx, String AD_WF_NodeNext_UU, String trxName) {
super(ctx, AD_WF_NodeNext_UU, trxName);
if (Util.isEmpty(AD_WF_NodeNext_UU))
@@ -105,7 +105,7 @@ public class MWFNodeNext extends X_AD_WF_NodeNext implements ImmutablePOSupport
} // MWFNodeNext
/**
- *
+ * Copy constructor
* @param copy
*/
public MWFNodeNext(MWFNodeNext copy)
@@ -114,7 +114,7 @@ public class MWFNodeNext extends X_AD_WF_NodeNext implements ImmutablePOSupport
}
/**
- *
+ * Copy constructor
* @param ctx
* @param copy
*/
@@ -124,7 +124,7 @@ public class MWFNodeNext extends X_AD_WF_NodeNext implements ImmutablePOSupport
}
/**
- *
+ * Copy constructor
* @param ctx
* @param copy
* @param trxName
@@ -159,6 +159,7 @@ public class MWFNodeNext extends X_AD_WF_NodeNext implements ImmutablePOSupport
* String Representation
* @return info
*/
+ @Override
public String toString ()
{
StringBuilder sb = new StringBuilder ("MWFNodeNext[");
@@ -171,11 +172,10 @@ public class MWFNodeNext extends X_AD_WF_NodeNext implements ImmutablePOSupport
sb.append ("]");
return sb.toString ();
} // toString
-
-
- /*************************************************************************
+
+ /**
* Get Conditions
- * @param requery true if requery
+ * @param requery true to reload from DB
* @return Array of Conditions
*/
public MWFNextCondition[] getConditions(boolean requery)
@@ -258,22 +258,21 @@ public class MWFNodeNext extends X_AD_WF_NodeNext implements ImmutablePOSupport
if (log.isLoggable(Level.FINE)) log.fine("isValidFor (" + ok + ") " + toString());
return ok;
} // isValidFor
-
-
+
/**
* Split Element is AND
- * @return Returns the from Split And.
+ * @return true if this is from Split And.
*/
public boolean isFromSplitAnd()
{
if (m_fromSplitAnd != null)
return m_fromSplitAnd.booleanValue();
return false;
- } // getFromSplitAnd
+ } // isFromSplitAnd
/**
* Split Element is AND.
- * Set by MWFNode.loadNodes
+ * Set by MWFNode.loadNodes.
* @param fromSplitAnd The from Split And
*/
public void setFromSplitAnd (boolean fromSplitAnd)
@@ -283,7 +282,7 @@ public class MWFNodeNext extends X_AD_WF_NodeNext implements ImmutablePOSupport
/**
* Join Element is AND
- * @return Returns the to Join And.
+ * @return true if this is to join and
*/
public boolean isToJoinAnd ()
{
@@ -317,7 +316,7 @@ public class MWFNodeNext extends X_AD_WF_NodeNext implements ImmutablePOSupport
return this;
}
- /**************************************************************************
+ /**
* Before Save
* @param newRecord
* @return true if it can be saved
diff --git a/org.adempiere.base/src/org/compiere/wf/MWFNodePara.java b/org.adempiere.base/src/org/compiere/wf/MWFNodePara.java
index a901c7883d..dc68d64367 100644
--- a/org.adempiere.base/src/org/compiere/wf/MWFNodePara.java
+++ b/org.adempiere.base/src/org/compiere/wf/MWFNodePara.java
@@ -26,9 +26,8 @@ import org.compiere.model.X_AD_WF_Node_Para;
import org.compiere.util.Env;
import org.idempiere.cache.ImmutablePOSupport;
-
/**
- * Workflow Node Process Parameter Model
+ * Extended Workflow Node Process Parameter Model for AD_WF_Node_Para
*
* @author Jorg Janke
* @version $Id: MWFNodePara.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
@@ -36,7 +35,7 @@ import org.idempiere.cache.ImmutablePOSupport;
public class MWFNodePara extends X_AD_WF_Node_Para implements ImmutablePOSupport
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -7304684637362248174L;
@@ -56,19 +55,18 @@ public class MWFNodePara extends X_AD_WF_Node_Para implements ImmutablePOSupport
list.toArray (retValue);
return retValue;
} // getParameters
-
-
+
/**
- * UUID based Constructor
- * @param ctx Context
- * @param AD_WF_Node_Para_UU UUID key
- * @param trxName Transaction
- */
+ * UUID based Constructor
+ * @param ctx Context
+ * @param AD_WF_Node_Para_UU UUID key
+ * @param trxName Transaction
+ */
public MWFNodePara(Properties ctx, String AD_WF_Node_Para_UU, String trxName) {
super(ctx, AD_WF_Node_Para_UU, trxName);
}
- /**************************************************************************
+ /**
* Standard Constructor
* @param ctx context
* @param id id
@@ -91,7 +89,7 @@ public class MWFNodePara extends X_AD_WF_Node_Para implements ImmutablePOSupport
} // MWFNodePara
/**
- *
+ * Copy constructor
* @param copy
*/
public MWFNodePara(MWFNodePara copy)
@@ -100,7 +98,7 @@ public class MWFNodePara extends X_AD_WF_Node_Para implements ImmutablePOSupport
}
/**
- *
+ * Copy constructor
* @param ctx
* @param copy
*/
@@ -110,7 +108,7 @@ public class MWFNodePara extends X_AD_WF_Node_Para implements ImmutablePOSupport
}
/**
- *
+ * Copy constructor
* @param ctx
* @param copy
* @param trxName
diff --git a/org.adempiere.base/src/org/compiere/wf/MWFProcess.java b/org.adempiere.base/src/org/compiere/wf/MWFProcess.java
index e92a92f838..e2e854474c 100644
--- a/org.adempiere.base/src/org/compiere/wf/MWFProcess.java
+++ b/org.adempiere.base/src/org/compiere/wf/MWFProcess.java
@@ -35,9 +35,8 @@ import org.compiere.util.Env;
import org.compiere.util.TimeUtil;
import org.compiere.util.Util;
-
/**
- * Workflow Process
+ * Extended Workflow Process model for AD_WF_Process
*
* @author Jorg Janke
* @author Silvano Trinchero, www.freepath.it
@@ -47,16 +46,16 @@ import org.compiere.util.Util;
public class MWFProcess extends X_AD_WF_Process
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 5981488658756275526L;
/**
- * UUID based Constructor
- * @param ctx Context
- * @param AD_WF_Process_UU UUID key
- * @param trxName Transaction
- */
+ * UUID based Constructor
+ * @param ctx Context
+ * @param AD_WF_Process_UU UUID key
+ * @param trxName Transaction
+ */
public MWFProcess(Properties ctx, String AD_WF_Process_UU, String trxName) {
super(ctx, AD_WF_Process_UU, trxName);
if (Util.isEmpty(AD_WF_Process_UU))
@@ -162,7 +161,7 @@ public class MWFProcess extends X_AD_WF_Process
/**
* Get active Activities of Process
- * @param requery if true requery
+ * @param requery true to reload from DB
* @param onlyActive only active activities
* @return array of activities
*/
@@ -173,7 +172,7 @@ public class MWFProcess extends X_AD_WF_Process
/**
* Get active Activities of Process
- * @param requery if true requery
+ * @param requery true to reload from DB
* @param onlyActive only active activities
* @return array of activities
*/
@@ -260,9 +259,8 @@ public class MWFProcess extends X_AD_WF_Process
+ ", Current=" + getWFState());
} // setWFState
-
- /**************************************************************************
- * Check Status of Activities.
+ /**
+ * Check Status of Activities.
* - start new activity
* @param trxName transaction
* @param lastPO PO
@@ -327,7 +325,7 @@ public class MWFProcess extends X_AD_WF_Process
getPO();
} // checkActivities
- /**************************************************************************
+ /**
* Update process status based on status of activities.
* @param trxName transaction
*/
@@ -394,6 +392,8 @@ public class MWFProcess extends X_AD_WF_Process
* Start Next Activity
* @param last last activity
* @param activities all activities
+ * @param lastPO
+ * @param trxName
* @return true if there is a next activity
*/
private boolean startNext (MWFActivity last, MWFActivity[] activities, PO lastPO, String trxName)
@@ -424,7 +424,7 @@ public class MWFProcess extends X_AD_WF_Process
*/
if(MWFNode.JOINELEMENT_AND.equals(activity.getNode().getJoinElement()))
{
- if(!isJoinElementANDProcessed(activity))
+ if(!isJoinElementAndProcessed(activity))
{
activity.delete(true, get_TrxName());
continue;
@@ -434,7 +434,6 @@ public class MWFProcess extends X_AD_WF_Process
activity.set_TrxName(trxName);
activity.run();
-
// only the first valid if XOR
if (MWFNode.SPLITELEMENT_XOR.equals(split))
return true;
@@ -442,13 +441,13 @@ public class MWFProcess extends X_AD_WF_Process
return true;
} // startNext
- /*
+ /**
* IDEMPIERE-3942
- * Implement JoinElement AND Status
+ * Implement JoinElement AND Status
+ * @param activity
+ * @return true if all parent activities processed
*/
- private boolean isJoinElementANDProcessed(MWFActivity activity) {
-
-
+ private boolean isJoinElementAndProcessed(MWFActivity activity) {
Query queryNodeNext = new Query(Env.getCtx(), MWFNodeNext.Table_Name, "AD_WF_Next_ID = ?", get_TrxName());
queryNodeNext.setParameters(activity.getAD_WF_Node_ID());
List nodeNexts = queryNodeNext.list();
@@ -463,10 +462,9 @@ public class MWFProcess extends X_AD_WF_Process
"AD_WF_Process_ID = ? AND AD_WF_Node_ID = ? ", get_TrxName());
Object params[] = { activity.getAD_WF_Process_ID(), nodeNext.getAD_WF_Node_ID() };
-
queryMWFActivity.setParameters(params);
- List parentActivitys = queryMWFActivity.list();
- for (MWFActivity parentActivity : parentActivitys) {
+ List parentActivities = queryMWFActivity.list();
+ for (MWFActivity parentActivity : parentActivities) {
totalActivities++;
if(!parentActivity.isProcessed())
return false;
@@ -479,7 +477,7 @@ public class MWFProcess extends X_AD_WF_Process
return true;
}
- /**************************************************************************
+ /**
* Set Workflow Responsible.
* Searches for a Invoker.
*/
@@ -496,10 +494,12 @@ public class MWFProcess extends X_AD_WF_Process
/**
* Set User from
- * - (1) Responsible
- * - (2) Document Sales Rep
- * - (3) Document UpdatedBy
- * - (4) Process invoker
+ *
+ *
Responsible
+ *
Document Sales Rep
+ *
Document UpdatedBy
+ *
Process invoker
+ *
* @param User_ID process invoker
*/
private void setUser_ID (Integer User_ID)
@@ -554,8 +554,7 @@ public class MWFProcess extends X_AD_WF_Process
return m_wf;
} // getWorkflow
-
- /**************************************************************************
+ /**
* Perform Action
* @param action StateEngine.ACTION_*
* @return true if valid
@@ -568,7 +567,7 @@ public class MWFProcess extends X_AD_WF_Process
+ ", CurrentState=" + getWFState());
return false;
}
- log.fine(action);
+ if (log.isLoggable(Level.FINE)) log.fine(action);
// Action is Valid
if (StateEngine.ACTION_Start.equals(action))
return startWork();
@@ -595,12 +594,6 @@ public class MWFProcess extends X_AD_WF_Process
{
// Start first Activity with first Node
MWFActivity activity = new MWFActivity (this, AD_WF_Node_ID);
- //
- // Thread workerWF = new Thread(activity);
- // workerWF.setName(activity.getAD_Workflow().getName() + " "
- // + activity.getAD_Table().getName() + " "
- // + activity.getRecord_ID());
- // workerWF.start();
activity.run();
}
@@ -615,8 +608,7 @@ public class MWFProcess extends X_AD_WF_Process
return true;
} // performStart
-
- /**************************************************************************
+ /**
* Get Persistent Object
* @return po
*/
@@ -633,7 +625,7 @@ public class MWFProcess extends X_AD_WF_Process
} // getPO
/**
- *
+ * Get process info
* @return {@link ProcessInfo}
*/
public ProcessInfo getProcessInfo()
@@ -655,6 +647,7 @@ public class MWFProcess extends X_AD_WF_Process
* Set Text Msg (add to existing)
* @param TextMsg msg
*/
+ @Override
public void setTextMsg (String TextMsg)
{
String oldText = getTextMsg();
@@ -715,7 +708,7 @@ public class MWFProcess extends X_AD_WF_Process
} // addTextMsg
/**
- * Set Runtime (Error) Message
+ * Set Process Execution (Error) Message
* @param msg message
*/
public void setProcessMsg (String msg)
@@ -726,7 +719,7 @@ public class MWFProcess extends X_AD_WF_Process
} // setProcessMsg
/**
- * Get Runtime (Error) Message
+ * Get Process Execution (Error) Message
* @return msg
*/
public String getProcessMsg()
diff --git a/org.adempiere.base/src/org/compiere/wf/MWFResponsible.java b/org.adempiere.base/src/org/compiere/wf/MWFResponsible.java
index 5c10c9979a..848e848c0f 100644
--- a/org.adempiere.base/src/org/compiere/wf/MWFResponsible.java
+++ b/org.adempiere.base/src/org/compiere/wf/MWFResponsible.java
@@ -26,9 +26,8 @@ import org.compiere.util.Msg;
import org.idempiere.cache.ImmutableIntPOCache;
import org.idempiere.cache.ImmutablePOSupport;
-
/**
- * Workflow Resoinsible
+ * Extended Workflow Responsible model for AD_WF_Responsible
*
* @author Jorg Janke
* @version $Id: MWFResponsible.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
@@ -36,7 +35,7 @@ import org.idempiere.cache.ImmutablePOSupport;
public class MWFResponsible extends X_AD_WF_Responsible implements ImmutablePOSupport
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -5073542640376766737L;
@@ -88,19 +87,18 @@ public class MWFResponsible extends X_AD_WF_Responsible implements ImmutablePOSu
/** Cache */
private static ImmutableIntPOCache s_cache = new ImmutableIntPOCache(Table_Name, 10);
-
/**
- * UUID based Constructor
- * @param ctx Context
- * @param AD_WF_Responsible_UU UUID key
- * @param trxName Transaction
- */
+ * UUID based Constructor
+ * @param ctx Context
+ * @param AD_WF_Responsible_UU UUID key
+ * @param trxName Transaction
+ */
public MWFResponsible(Properties ctx, String AD_WF_Responsible_UU, String trxName) {
super(ctx, AD_WF_Responsible_UU, trxName);
}
- /**************************************************************************
+ /**
* Standard Constructor
* @param ctx context
* @param AD_WF_Responsible_ID id
@@ -123,7 +121,7 @@ public class MWFResponsible extends X_AD_WF_Responsible implements ImmutablePOSu
} // MWFResponsible
/**
- *
+ * Copy constructor
* @param copy
*/
public MWFResponsible(MWFResponsible copy)
@@ -132,7 +130,7 @@ public class MWFResponsible extends X_AD_WF_Responsible implements ImmutablePOSu
}
/**
- *
+ * Copy constructor
* @param ctx
* @param copy
*/
@@ -142,7 +140,7 @@ public class MWFResponsible extends X_AD_WF_Responsible implements ImmutablePOSu
}
/**
- *
+ * Copy constructor
* @param ctx
* @param copy
* @param trxName
@@ -163,7 +161,7 @@ public class MWFResponsible extends X_AD_WF_Responsible implements ImmutablePOSu
} // isInvoker
/**
- * Is Role Responsible
+ * Is Role Responsible Type
* @return true if role
*/
public boolean isRole()
@@ -173,7 +171,7 @@ public class MWFResponsible extends X_AD_WF_Responsible implements ImmutablePOSu
} // isRole
/**
- * Is Role Responsible
+ * Get reference role instance
* @return true if role
*/
public MRole getRole()
@@ -184,7 +182,7 @@ public class MWFResponsible extends X_AD_WF_Responsible implements ImmutablePOSu
} // getRole
/**
- * Is Human Responsible
+ * Is Human Responsible Type
* @return true if human
*/
public boolean isHuman()
@@ -194,7 +192,7 @@ public class MWFResponsible extends X_AD_WF_Responsible implements ImmutablePOSu
} // isHuman
/**
- * Is Org Responsible
+ * Is Org Responsible Type
* @return true if Org
*/
public boolean isOrganization()
@@ -206,12 +204,11 @@ public class MWFResponsible extends X_AD_WF_Responsible implements ImmutablePOSu
/**
* Before Save
* @param newRecord new
- * @return tre if can be saved
+ * @return true if can be saved
*/
+ @Override
protected boolean beforeSave (boolean newRecord)
{
- // if (RESPONSIBLETYPE_Human.equals(getResponsibleType()) && getAD_User_ID() == 0)
- // return true;
if (RESPONSIBLETYPE_Role.equals(getResponsibleType())
&& getAD_Role_ID() == 0
&& getAD_Client_ID() > 0)
@@ -238,6 +235,7 @@ public class MWFResponsible extends X_AD_WF_Responsible implements ImmutablePOSu
* String Representation
* @return info
*/
+ @Override
public String toString ()
{
StringBuilder sb = new StringBuilder("MWFResponsible[");
@@ -252,6 +250,10 @@ public class MWFResponsible extends X_AD_WF_Responsible implements ImmutablePOSu
return sb.toString ();
} // toString
+ /**
+ * Is manual responsible type
+ * @return true if this is manual responsible type
+ */
public boolean isManual() {
return RESPONSIBLETYPE_Manual.equals(getResponsibleType());
}
diff --git a/org.adempiere.base/src/org/compiere/wf/MWorkflow.java b/org.adempiere.base/src/org/compiere/wf/MWorkflow.java
index 8b1deae48a..3691847b0f 100644
--- a/org.adempiere.base/src/org/compiere/wf/MWorkflow.java
+++ b/org.adempiere.base/src/org/compiere/wf/MWorkflow.java
@@ -53,21 +53,21 @@ import org.idempiere.cache.ImmutablePOSupport;
import org.idempiere.cache.ImmutablePOCache;
/**
- * WorkFlow Model
+ * Extended WorkFlow Model for AD_Workflow
*
* @author Jorg Janke
* @version $Id: MWorkflow.java,v 1.4 2006/07/30 00:51:05 jjanke Exp $
*
- * @author Teo Sarca, www.arhipac.ro
+ * @author Teo Sarca, www.arhipac.ro
*
FR [ 2214883 ] Remove SQL code and Replace for Query
*
BF [ 2665963 ] Copy Workflow name in Activity name
- * @author Silvano Trinchero, www.freepath.it
+ * @author Silvano Trinchero, www.freepath.it
*
IDEMPIERE-3209 changed functions to public to improve integration support
*/
public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 727250581144217545L;
@@ -118,15 +118,15 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
}
/**
- * Get Doc Value Workflow
+ * Get Doc Value Workflows
* @param ctx context
* @param AD_Client_ID client
* @param AD_Table_ID table
+ * @param trxName
* @return document value workflow array or null
*/
public static synchronized MWorkflow[] getDocValue (Properties ctx, int AD_Client_ID, int AD_Table_ID
- , String trxName //Bug 1568766 Trx should be kept all along the road
- )
+ , String trxName)
{
// Reload
Map cachedMap = s_cacheDocValue.get(AD_Client_ID);
@@ -165,20 +165,9 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
}
// Look for Entry
MWorkflow[] retValue = (MWorkflow[])cachedMap.get(AD_Table_ID);
- //hengsin: this is not threadsafe
- /*
- //set trxName to all workflow instance
- if ( retValue != null && retValue.length > 0 )
- {
- for(int i = 0; i < retValue.length; i++)
- {
- retValue[i].set_TrxName(trxName);
- }
- }*/
return retValue != null ? Arrays.stream(retValue).map(e -> {return new MWorkflow(ctx, e, trxName);}).toArray(MWorkflow[]::new) : null;
} // getDocValue
-
/** Single Cache */
private static ImmutablePOCache s_cache = new ImmutablePOCache(Table_Name, Table_Name, 20);
/** Document Value Cache */
@@ -195,14 +184,13 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
};
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger (MWorkflow.class);
-
-
+
/**
- * UUID based Constructor
- * @param ctx Context
- * @param AD_Workflow_UU UUID key
- * @param trxName Transaction
- */
+ * UUID based Constructor
+ * @param ctx Context
+ * @param AD_Workflow_UU UUID key
+ * @param trxName Transaction
+ */
public MWorkflow(Properties ctx, String AD_Workflow_UU, String trxName) {
super(ctx, AD_Workflow_UU, trxName);
if (Util.isEmpty(AD_Workflow_UU))
@@ -211,7 +199,7 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
loadNodes();
}
- /**************************************************************************
+ /**
* Create/Load Workflow
* @param ctx Context
* @param AD_Workflow_ID ID
@@ -261,7 +249,7 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
} // Workflow
/**
- *
+ * Copy constructor
* @param copy
*/
public MWorkflow(MWorkflow copy)
@@ -270,7 +258,7 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
}
/**
- *
+ * Copy constructor
* @param ctx
* @param copy
*/
@@ -280,7 +268,7 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
}
/**
- *
+ * Copy constructor
* @param ctx
* @param copy
* @param trxName
@@ -358,9 +346,8 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
m_nodes.stream().forEach(e -> e.markImmutable());
if (log.isLoggable(Level.FINE)) log.fine("#" + m_nodes.size());
} // loadNodes
-
- /**************************************************************************
+ /**
* Get Number of Nodes
* @return number of nodes
*/
@@ -394,7 +381,9 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
return retValue;
} // getNodes
-
+ /**
+ * Reload all nodes
+ */
public void reloadNodes() {
m_nodes = null;
loadNodes();
@@ -402,7 +391,7 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
/**
* Get the first node
- * @return array of next nodes
+ * @return first workflow node
*/
public MWFNode getFirstNode()
{
@@ -496,33 +485,11 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
return nodeArray;
} // getNodesInOrder
- /**
- * Add Nodes recursively (depth first) to Ordered List
- * @param list list to add to
- * @param AD_WF_Node_ID start node id
- * @param AD_Client_ID for client
- */
- /*private void addNodesDF (ArrayList list, int AD_WF_Node_ID, int AD_Client_ID)
- {
- MWFNode node = getNode (AD_WF_Node_ID);
- if (node != null && !list.contains(node))
- {
- list.add(node);
- // Get Dependent
- MWFNodeNext[] nexts = node.getTransitions(AD_Client_ID);
- for (int i = 0; i < nexts.length; i++)
- {
- if (nexts[i].isActive())
- addNodesDF (list, nexts[i].getAD_WF_Next_ID(), AD_Client_ID);
- }
- }
- } // addNodesDF*/
-
/**
* Add Nodes recursively (sibling first) to Ordered List
* @param list list to add to
* @param AD_WF_Node_ID start node id
- * @param AD_Client_ID for client
+ * @param AD_Client_ID
*/
private void addNodesSF (ArrayList list, int AD_WF_Node_ID, int AD_Client_ID)
{
@@ -554,10 +521,10 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
}
} // addNodesSF
- /**************************************************************************
- * Get first transition (Next Node) of ID
- * @param AD_WF_Node_ID id
- * @param AD_Client_ID for client
+ /**
+ * Get first transition (Next Node) node id
+ * @param AD_WF_Node_ID from node id
+ * @param AD_Client_ID
* @return next AD_WF_Node_ID or 0
*/
public int getNext (int AD_WF_Node_ID, int AD_Client_ID)
@@ -577,9 +544,9 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
} // getNext
/**
- * Get Transitions (NodeNext) of ID
- * @param AD_WF_Node_ID id
- * @param AD_Client_ID for client
+ * Get Transitions (NodeNext) node id
+ * @param AD_WF_Node_ID from node id
+ * @param AD_Client_ID
* @return array of next nodes
*/
public MWFNodeNext[] getNodeNexts (int AD_WF_Node_ID, int AD_Client_ID)
@@ -596,9 +563,9 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
} // getNext
/**
- * Get (first) Previous Node of ID
- * @param AD_WF_Node_ID id
- * @param AD_Client_ID for client
+ * Get (first) Previous Node ID
+ * @param AD_WF_Node_ID from node id
+ * @param AD_Client_ID
* @return next AD_WF_Node_ID or 0
*/
public int getPrevious (int AD_WF_Node_ID, int AD_Client_ID)
@@ -617,10 +584,10 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
} // getPrevious
/**
- * Get very Last Node
+ * Get Last Node id
* @param AD_WF_Node_ID ignored
- * @param AD_Client_ID for client
- * @return next AD_WF_Node_ID or 0
+ * @param AD_Client_ID
+ * @return last AD_WF_Node_ID or 0
*/
public int getLast (int AD_WF_Node_ID, int AD_Client_ID)
{
@@ -632,9 +599,9 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
/**
* Is this the first Node
- * @param AD_WF_Node_ID id
- * @param AD_Client_ID for client
- * @return true if first node
+ * @param AD_WF_Node_ID node id
+ * @param AD_Client_ID
+ * @return true if node id is first node
*/
public boolean isFirst (int AD_WF_Node_ID, int AD_Client_ID)
{
@@ -643,18 +610,17 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
/**
* Is this the last Node
- * @param AD_WF_Node_ID id
- * @param AD_Client_ID for client
- * @return true if last node
+ * @param AD_WF_Node_ID node id
+ * @param AD_Client_ID
+ * @return true if node id is last node
*/
public boolean isLast (int AD_WF_Node_ID, int AD_Client_ID)
{
MWFNode[] nodes = getNodesInOrder(AD_Client_ID);
return AD_WF_Node_ID == nodes[nodes.length-1].getAD_WF_Node_ID();
} // isLast
-
- /**************************************************************************
+ /**
* Get Name
* @param translated translated
* @return Name
@@ -694,6 +660,7 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
* String Representation
* @return info
*/
+ @Override
public String toString ()
{
StringBuilder sb = new StringBuilder ("MWorkflow[");
@@ -702,11 +669,12 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
return sb.toString ();
} // toString
- /**************************************************************************
+ /**
* Before Save
* @param newRecord new
* @return true
*/
+ @Override
protected boolean beforeSave (boolean newRecord)
{
validate();
@@ -719,6 +687,7 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
* @param success success
* @return true if save complete (if not overwritten true)
*/
+ @Override
protected boolean afterSave (boolean newRecord, boolean success)
{
if (log.isLoggable(Level.FINE)) log.fine("Success=" + success);
@@ -759,7 +728,7 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
return success;
} // afterSave
- /**************************************************************************
+ /**
* Start Workflow.
* @param pi Process Info (Record_ID)
* @deprecated
@@ -770,9 +739,10 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
return start(pi, null);
}
- /**************************************************************************
+ /**
* Start Workflow.
- * @param pi Process Info (Record_ID)
+ * @param pi Process Info
+ * @param trxName
* @return process
*/
public MWFProcess start (ProcessInfo pi, String trxName)
@@ -835,7 +805,9 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
* Start Workflow and Wait for completion.
* @param pi process info with Record_ID record for the workflow
* @return process
+ * @deprecated workflow process run in the same thread, this is meaningless
*/
+ @Deprecated
public MWFProcess startWait (ProcessInfo pi)
{
final int SLEEP = 500; // 1/2 sec
@@ -856,7 +828,6 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
pi.setIsTimeout(true);
return process;
}
- // System.out.println("--------------- " + loops + ": " + state);
try
{
Thread.sleep(SLEEP);
@@ -903,8 +874,8 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
} // getDurationBaseSec
/**
- * Get Duration CalendarField
- * @return Calendar.MINUTE, etc.
+ * Get Duration Calendar Field
+ * @return Calendar field (Calendar.MINUTE, etc)
*/
public int getDurationCalendarField()
{
@@ -924,11 +895,10 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
return Calendar.YEAR;
return Calendar.MINUTE;
} // getDurationCalendarField
-
- /**************************************************************************
+ /**
* Validate workflow.
- * Sets Valid flag
+ * Sets Valid flag.
* @return errors or ""
*/
public String validate()
@@ -942,8 +912,6 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
&& (getDocValueLogic() == null || getDocValueLogic().length() == 0))
errors.append(" - No Document Value Logic");
//
-
- //
if (getWorkflowType().equals(MWorkflow.WORKFLOWTYPE_Manufacturing))
{
this.setAD_Table_ID(0);
@@ -957,93 +925,6 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
return errors.toString();
} // validate
-
-
- /**************************************************************************
- * main
- * @param args
- */
- public static void main (String[] args)
- {
- org.compiere.Adempiere.startup(true);
-
- // Create Standard Document Process
- MWorkflow wf = new MWorkflow(Env.getCtx(), 0, null);
- wf.setValue ("Process_xx");
- wf.setName (wf.getValue());
- wf.setDescription("(Standard " + wf.getValue());
- wf.setEntityType (ENTITYTYPE_Dictionary);
- wf.saveEx();
- //
- MWFNode node10 = new MWFNode (wf, "10", "(Start)");
- node10.setDescription("(Standard Node)");
- node10.setEntityType (ENTITYTYPE_Dictionary);
- node10.setAction(MWFNode.ACTION_WaitSleep);
- node10.setWaitTime(0);
- node10.setPosition(5, 5);
- node10.saveEx();
- wf.setAD_WF_Node_ID(node10.getAD_WF_Node_ID());
- wf.saveEx();
-
- MWFNode node20 = new MWFNode (wf, "20", "(DocAuto)");
- node20.setDescription("(Standard Node)");
- node20.setEntityType (ENTITYTYPE_Dictionary);
- node20.setAction(MWFNode.ACTION_DocumentAction);
- node20.setDocAction(MWFNode.DOCACTION_None);
- node20.setPosition(5, 120);
- node20.saveEx();
- MWFNodeNext tr10_20 = new MWFNodeNext(node10, node20.getAD_WF_Node_ID());
- tr10_20.setEntityType (ENTITYTYPE_Dictionary);
- tr10_20.setDescription("(Standard Transition)");
- tr10_20.setSeqNo(100);
- tr10_20.saveEx();
-
- MWFNode node100 = new MWFNode (wf, "100", "(DocPrepare)");
- node100.setDescription("(Standard Node)");
- node100.setEntityType (ENTITYTYPE_Dictionary);
- node100.setAction(MWFNode.ACTION_DocumentAction);
- node100.setDocAction(MWFNode.DOCACTION_Prepare);
- node100.setPosition(170, 5);
- node100.saveEx();
- MWFNodeNext tr10_100 = new MWFNodeNext(node10, node100.getAD_WF_Node_ID());
- tr10_100.setEntityType (ENTITYTYPE_Dictionary);
- tr10_100.setDescription("(Standard Approval)");
- tr10_100.setIsStdUserWorkflow(true);
- tr10_100.setSeqNo(10);
- tr10_100.saveEx();
-
- MWFNode node200 = new MWFNode (wf, "200", "(DocComplete)");
- node200.setDescription("(Standard Node)");
- node200.setEntityType (ENTITYTYPE_Dictionary);
- node200.setAction(MWFNode.ACTION_DocumentAction);
- node200.setDocAction(MWFNode.DOCACTION_Complete);
- node200.setPosition(170, 120);
- node200.saveEx();
- MWFNodeNext tr100_200 = new MWFNodeNext(node100, node200.getAD_WF_Node_ID());
- tr100_200.setEntityType (ENTITYTYPE_Dictionary);
- tr100_200.setDescription("(Standard Transition)");
- tr100_200.setSeqNo(100);
- tr100_200.saveEx();
-
-
- /**
- Env.setContext(Env.getCtx(), Env.AD_CLIENT_ID, "11");
- Env.setContext(Env.getCtx(), Env.AD_ORG_ID, "11");
- Env.setContext(Env.getCtx(), Env.AD_USER_ID, "100");
- //
- int AD_Workflow_ID = 115; // Requisition WF
- int M_Requsition_ID = 100;
- MRequisition req = new MRequisition (Env.getCtx(), M_Requsition_ID);
- req.setDocStatus(DocAction.DOCSTATUS_Drafted);
- req.saveEx();
- Log.setTraceLevel(8);
- System.out.println("---------------------------------------------------");
- MWorkflow wf = MWorkflow.get (Env.getCtx(), AD_Workflow_ID);
- **/
- // wf.start(M_Requsition_ID);
-
- } // main
-
/**
* Get AD_Workflow_ID for given M_Product_ID
* @param product
@@ -1058,9 +939,9 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
}
/**
- * Check if the workflow is valid for given date
+ * Check if this workflow is valid for given date
* @param date
- * @return true if valid
+ * @return true if valid for given date
*/
public boolean isValidFromTo(Timestamp date)
{
@@ -1087,9 +968,9 @@ public class MWorkflow extends X_AD_Workflow implements ImmutablePOSupport
}
/**
- *
+ * Run document action workflow
* @param po
- * @param docAction
+ * @param docAction DocAction.ACTION_*
* @return ProcessInfo
*/
public static ProcessInfo runDocumentActionWorkflow(PO po, String docAction)
diff --git a/org.adempiere.base/src/org/compiere/wf/MWorkflowAccess.java b/org.adempiere.base/src/org/compiere/wf/MWorkflowAccess.java
index 5e46c289ee..ee2539e4e9 100644
--- a/org.adempiere.base/src/org/compiere/wf/MWorkflowAccess.java
+++ b/org.adempiere.base/src/org/compiere/wf/MWorkflowAccess.java
@@ -23,27 +23,25 @@ import org.compiere.model.MRole;
import org.compiere.model.X_AD_Workflow_Access;
import org.compiere.util.Util;
-
/**
- * Worflow Access Model
+ * Extended Workflow Access Model for AD_Workflow_Access
*
* @author Jorg Janke
* @version $Id: MWorkflowAccess.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
*/
public class MWorkflowAccess extends X_AD_Workflow_Access
{
-
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 2598861248782340850L;
/**
- * UUID based Constructor
- * @param ctx Context
- * @param AD_Workflow_Access_UU UUID key
- * @param trxName Transaction
- */
+ * UUID based Constructor
+ * @param ctx Context
+ * @param AD_Workflow_Access_UU UUID key
+ * @param trxName Transaction
+ */
public MWorkflowAccess(Properties ctx, String AD_Workflow_Access_UU, String trxName) {
super(ctx, AD_Workflow_Access_UU, trxName);
if (Util.isEmpty(AD_Workflow_Access_UU))
diff --git a/org.adempiere.base/src/org/compiere/wf/MWorkflowProcessor.java b/org.adempiere.base/src/org/compiere/wf/MWorkflowProcessor.java
index 332c4dce98..57c41258a8 100644
--- a/org.adempiere.base/src/org/compiere/wf/MWorkflowProcessor.java
+++ b/org.adempiere.base/src/org/compiere/wf/MWorkflowProcessor.java
@@ -32,9 +32,8 @@ import org.compiere.model.X_AD_WorkflowProcessor;
import org.compiere.util.DB;
import org.compiere.util.Util;
-
/**
- * Workflow Processor Model
+ * Extended Workflow Processor Model for AD_WorkflowProcessor
*
* @author Jorg Janke
* @version $Id: MWorkflowProcessor.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
@@ -43,14 +42,14 @@ public class MWorkflowProcessor extends X_AD_WorkflowProcessor
implements AdempiereProcessor,AdempiereProcessor2
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 6110376502075157361L;
/**
- * Get Active
+ * Get active workflow processors
* @param ctx context
- * @return active processors
+ * @return active workflow processors
*/
public static MWorkflowProcessor[] getActive (Properties ctx)
{
@@ -61,19 +60,18 @@ public class MWorkflowProcessor extends X_AD_WorkflowProcessor
list.toArray (retValue);
return retValue;
} // getActive
-
-
+
/**
- * UUID based Constructor
- * @param ctx Context
- * @param AD_WorkflowProcessor_UU UUID key
- * @param trxName Transaction
- */
+ * UUID based Constructor
+ * @param ctx Context
+ * @param AD_WorkflowProcessor_UU UUID key
+ * @param trxName Transaction
+ */
public MWorkflowProcessor(Properties ctx, String AD_WorkflowProcessor_UU, String trxName) {
super(ctx, AD_WorkflowProcessor_UU, trxName);
}
- /**************************************************************************
+ /**
* Standard Constructor
* @param ctx context
* @param AD_WorkflowProcessor_ID id
@@ -97,8 +95,9 @@ public class MWorkflowProcessor extends X_AD_WorkflowProcessor
/**
* Get Server ID
- * @return id
+ * @return server id
*/
+ @Override
public String getServerID ()
{
return "WorkflowProcessor" + get_ID();
@@ -106,8 +105,8 @@ public class MWorkflowProcessor extends X_AD_WorkflowProcessor
/**
* Get Date Next Run
- * @param requery requery
- * @return date next run
+ * @param requery true to reload from DB
+ * @return next run date
*/
public Timestamp getDateNextRun (boolean requery)
{
@@ -117,9 +116,10 @@ public class MWorkflowProcessor extends X_AD_WorkflowProcessor
} // getDateNextRun
/**
- * Get Logs
- * @return logs
+ * Get process logs
+ * @return processor logs
*/
+ @Override
public AdempiereProcessorLog[] getLogs ()
{
List list = new Query(getCtx(), MWorkflowProcessorLog.Table_Name, "AD_WorkflowProcessor_ID=?", get_TrxName())
@@ -132,8 +132,8 @@ public class MWorkflowProcessor extends X_AD_WorkflowProcessor
} // getLogs
/**
- * Delete old Request Log
- * @return number of records
+ * Delete old processor logs
+ * @return number of records deleted
*/
public int deleteLog()
{
diff --git a/org.adempiere.base/src/org/compiere/wf/MWorkflowProcessorLog.java b/org.adempiere.base/src/org/compiere/wf/MWorkflowProcessorLog.java
index e5f4d7e311..5777ddb9c0 100644
--- a/org.adempiere.base/src/org/compiere/wf/MWorkflowProcessorLog.java
+++ b/org.adempiere.base/src/org/compiere/wf/MWorkflowProcessorLog.java
@@ -23,9 +23,8 @@ import org.compiere.model.AdempiereProcessorLog;
import org.compiere.model.X_AD_WorkflowProcessorLog;
import org.compiere.util.Util;
-
/**
- * Processor Log
+ * Extended Workflow Processor Log model for AD_WorkflowProcessorLog
*
* @author Jorg Janke
* @version $Id: MWorkflowProcessorLog.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
@@ -34,16 +33,16 @@ public class MWorkflowProcessorLog extends X_AD_WorkflowProcessorLog
implements AdempiereProcessorLog
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 7646579803939292482L;
/**
- * UUID based Constructor
- * @param ctx Context
- * @param AD_WorkflowProcessorLog_UU UUID key
- * @param trxName Transaction
- */
+ * UUID based Constructor
+ * @param ctx Context
+ * @param AD_WorkflowProcessorLog_UU UUID key
+ * @param trxName Transaction
+ */
public MWorkflowProcessorLog(Properties ctx, String AD_WorkflowProcessorLog_UU, String trxName) {
super(ctx, AD_WorkflowProcessorLog_UU, trxName);
if (Util.isEmpty(AD_WorkflowProcessorLog_UU))
diff --git a/org.adempiere.base/src/org/compiere/wf/WFActivityManage.java b/org.adempiere.base/src/org/compiere/wf/WFActivityManage.java
index 03bda1668e..94b90aa8b3 100644
--- a/org.adempiere.base/src/org/compiere/wf/WFActivityManage.java
+++ b/org.adempiere.base/src/org/compiere/wf/WFActivityManage.java
@@ -25,7 +25,7 @@ import org.compiere.process.StateEngine;
import org.compiere.process.SvrProcess;
/**
- * Manage Workflow Activity
+ * Process to Manage Workflow Activity
*
* @author Jorg Janke
* @version $Id: WFActivityManage.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
@@ -45,6 +45,7 @@ public class WFActivityManage extends SvrProcess
/**
* Prepare - e.g., get Parameters.
*/
+ @Override
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
@@ -70,6 +71,7 @@ public class WFActivityManage extends SvrProcess
* @return Message (variables are parsed)
* @throws Exception if not successful
*/
+ @Override
protected String doIt() throws Exception
{
MWFActivity activity = new MWFActivity (getCtx(), p_AD_WF_Activity_ID, get_TrxName());
diff --git a/org.adempiere.base/src/org/compiere/wf/WFProcessManage.java b/org.adempiere.base/src/org/compiere/wf/WFProcessManage.java
index f00563f4ad..073dee4006 100644
--- a/org.adempiere.base/src/org/compiere/wf/WFProcessManage.java
+++ b/org.adempiere.base/src/org/compiere/wf/WFProcessManage.java
@@ -25,7 +25,7 @@ import org.compiere.process.StateEngine;
import org.compiere.process.SvrProcess;
/**
- * Manage Workflow Process
+ * Process to Manage Workflow Process
*
* @author Jorg Janke
* @version $Id: WFProcessManage.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
@@ -45,6 +45,7 @@ public class WFProcessManage extends SvrProcess
/**
* Prepare - e.g., get Parameters.
*/
+ @Override
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
@@ -70,6 +71,7 @@ public class WFProcessManage extends SvrProcess
* @return Message (variables are parsed)
* @throws Exception if not successful
*/
+ @Override
protected String doIt() throws Exception
{
MWFProcess process = new MWFProcess (getCtx(), p_AD_WF_Process_ID, get_TrxName());
diff --git a/org.adempiere.base/src/org/compiere/wf/WorkflowMoveToClient.java b/org.adempiere.base/src/org/compiere/wf/WorkflowMoveToClient.java
index 750d22ccda..84afcb9292 100644
--- a/org.adempiere.base/src/org/compiere/wf/WorkflowMoveToClient.java
+++ b/org.adempiere.base/src/org/compiere/wf/WorkflowMoveToClient.java
@@ -25,7 +25,7 @@ import org.compiere.util.AdempiereSystemError;
import org.compiere.util.DB;
/**
- * Move Workflow Customizations to Client
+ * Process to Move Workflow Customizations from System to Client
*
* @author Jorg Janke
* @version $Id: WorkflowMoveToClient.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
@@ -41,6 +41,7 @@ public class WorkflowMoveToClient extends SvrProcess
/**
* Prepare - e.g., get Parameters.
*/
+ @Override
protected void prepare ()
{
ProcessInfoParameter[] para = getParameter();
@@ -59,10 +60,11 @@ public class WorkflowMoveToClient extends SvrProcess
} // prepare
/**
- * Process
+ * Perform Process
* @return message
* @throws Exception
*/
+ @Override
protected String doIt () throws Exception
{
if (log.isLoggable(Level.INFO)) log.info("doIt - AD_Client_ID=" + p_AD_Client_ID + ", AD_Workflow_ID=" + p_AD_Workflow_ID);
diff --git a/org.adempiere.base/src/org/compiere/wf/WorkflowValidate.java b/org.adempiere.base/src/org/compiere/wf/WorkflowValidate.java
index bc950b4684..7a456f0a8c 100644
--- a/org.adempiere.base/src/org/compiere/wf/WorkflowValidate.java
+++ b/org.adempiere.base/src/org/compiere/wf/WorkflowValidate.java
@@ -24,7 +24,7 @@ import org.compiere.util.Msg;
/**
- * Validate Workflow Process
+ * Process to Validate Workflow
*
* @author Jorg Janke
* @version $Id: WorkflowValidate.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
@@ -37,16 +37,18 @@ public class WorkflowValidate extends SvrProcess
/**
* Prepare
*/
+ @Override
protected void prepare ()
{
p_AD_Worlflow_ID = getRecord_ID();
} // prepare
/**
- * Process
+ * Run Process
* @return info
* @throws Exception
*/
+ @Override
protected String doIt () throws Exception
{
MWorkflow wf = new MWorkflow(getCtx(), p_AD_Worlflow_ID, get_TrxName());
diff --git a/org.adempiere.base/src/org/compiere/wf/package-info.java b/org.adempiere.base/src/org/compiere/wf/package-info.java
new file mode 100644
index 0000000000..d25bfc2b7f
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/wf/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide iDempiere workflow engine implementation
+ */
+package org.compiere.wf;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/eevolution/model/package-info.java b/org.adempiere.base/src/org/eevolution/model/package-info.java
new file mode 100644
index 0000000000..86b1c00598
--- /dev/null
+++ b/org.adempiere.base/src/org/eevolution/model/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide extended and generated model class and interface for tables.
+ */
+package org.eevolution.model;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/eevolution/process/BankTransfer.java b/org.adempiere.base/src/org/eevolution/process/BankTransfer.java
index c355c47a2e..5e594d4c0c 100644
--- a/org.adempiere.base/src/org/eevolution/process/BankTransfer.java
+++ b/org.adempiere.base/src/org/eevolution/process/BankTransfer.java
@@ -32,9 +32,8 @@ import org.compiere.util.Msg;
import org.compiere.util.Util;
/**
- * Bank Transfer. Generate two Payments entry
- *
- * For Bank Transfer From Bank Account "A"
+ * Process for Bank Transfer.
+ * Generate two Payments entry for Bank Transfer From Bank Account "A".
*
* @author victor.perez@e-evoltuion.com
* @author Carlos Ruiz - globalqss - bxservice - add create bank transfer document
@@ -62,6 +61,7 @@ public class BankTransfer extends SvrProcess
/**
* Prepare - e.g., get Parameters.
*/
+ @Override
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
@@ -104,6 +104,7 @@ public class BankTransfer extends SvrProcess
* @return Message (translated text)
* @throws Exception if not successful
*/
+ @Override
protected String doIt() throws Exception
{
if (log.isLoggable(Level.INFO)) log.info("From Bank="+p_From_C_BankAccount_ID+" - To Bank="+p_To_C_BankAccount_ID
@@ -150,8 +151,7 @@ public class BankTransfer extends SvrProcess
/**
- * Generate BankTransfer()
- *
+ * Create and Complete 2 payment document for bank transfer
*/
private void generateBankTransfer()
{
@@ -213,9 +213,8 @@ public class BankTransfer extends SvrProcess
} // generateBankTransfer
/**
- * Generate Bank Transfer Document
+ * Create and Complete Bank Transfer Document ({@link MBankTransfer})
* @throws Exception
- *
*/
private void generateBankTransferDoc() throws Exception {
MBankTransfer bt = new MBankTransfer(getCtx(), 0, get_TrxName());
diff --git a/org.adempiere.base/src/org/eevolution/process/CopyFromBOM.java b/org.adempiere.base/src/org/eevolution/process/CopyFromBOM.java
index 571c74e72d..027e933a56 100644
--- a/org.adempiere.base/src/org/eevolution/process/CopyFromBOM.java
+++ b/org.adempiere.base/src/org/eevolution/process/CopyFromBOM.java
@@ -28,9 +28,8 @@ import org.eevolution.model.MPPProductBOM;
import org.eevolution.model.MPPProductBOMLine;
/**
- * CopyFromBOM Process
- * Copies BOM Lines from Selected BOM to the Current BOM
- * The BOM being copied to must have no pre-existing BOM Lines
+ * Process to copy BOM Lines from Selected BOM to the Current BOM.
+ * The BOM being copied to must have no pre-existing BOM Lines.
*
* @author Tony Snook
* @version $Id: CopyFromBOM.java,v 1.0 2008/07/04 05:24:03 tspc Exp $
@@ -46,6 +45,7 @@ public class CopyFromBOM extends SvrProcess {
/**
* Prepare - e.g., get Parameters.
*/
+ @Override
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
@@ -62,6 +62,7 @@ public class CopyFromBOM extends SvrProcess {
p_Record_ID = getRecord_ID();
} // prepare
+ @Override
protected String doIt() throws Exception
{
if (log.isLoggable(Level.INFO)) log.info("From PP_Product_BOM_ID=" + p_PP_Product_BOM_ID + " to " + p_Record_ID);
diff --git a/org.adempiere.base/src/org/eevolution/process/EnableNativeSequence.java b/org.adempiere.base/src/org/eevolution/process/EnableNativeSequence.java
index f23b009cac..93f9904735 100644
--- a/org.adempiere.base/src/org/eevolution/process/EnableNativeSequence.java
+++ b/org.adempiere.base/src/org/eevolution/process/EnableNativeSequence.java
@@ -16,31 +16,20 @@
package org.eevolution.process;
-
-
-import static org.compiere.model.SystemIDs.PROCESS_AD_NATIVE_SEQUENCE_ENABLE;
-
import java.util.List;
-import java.util.Properties;
-import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
-import org.compiere.Adempiere;
-import org.compiere.model.MPInstance;
import org.compiere.model.MSequence;
import org.compiere.model.MSysConfig;
import org.compiere.model.MTable;
import org.compiere.model.Query;
import org.compiere.model.SystemIDs;
import org.compiere.model.X_AD_Table;
-import org.compiere.process.ProcessInfo;
import org.compiere.process.SvrProcess;
-import org.compiere.util.CLogMgt;
import org.compiere.util.CacheMgt;
-import org.compiere.util.Env;
/**
- * Enable Native Sequence
+ * Process to Enable Native Sequence
*
* @author Victor Perez, e-Evolution, S.C.
* @author Teo Sarca, teo.sarca@gmail.com
@@ -48,14 +37,15 @@ import org.compiere.util.Env;
@org.adempiere.base.annotation.Process
public class EnableNativeSequence extends SvrProcess
{
-
/**
* Prepare - e.g., get Parameters.
*/
+ @Override
protected void prepare()
{
} // prepare
+ @Override
protected String doIt() throws Exception
{
boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue(MSysConfig.SYSTEM_NATIVE_SEQUENCE,false);
@@ -94,6 +84,11 @@ public class EnableNativeSequence extends SvrProcess
return "@OK@";
}
+ /**
+ * Create native sequence
+ * @param table
+ * @param trxName
+ */
private void createSequence(MTable table, String trxName)
{
if(!table.isView())
@@ -108,38 +103,15 @@ public class EnableNativeSequence extends SvrProcess
}
}
}
+
+ /**
+ * Create native sequence
+ * @param tableName
+ * @param trxName
+ */
private void createSequence(String tableName, String trxName)
{
createSequence(MTable.get(getCtx(), tableName), trxName);
- }
-
- /**
- * Main test
- * @param args
- * @throws Exception
- */
- public static void main(String[] args)
- {
- Adempiere.startupEnvironment(true);
- CLogMgt.setLevel(Level.INFO);
-
- Properties ctx = Env.getCtx();
- int AD_Process_ID = PROCESS_AD_NATIVE_SEQUENCE_ENABLE; // HARDCODED
-
- MPInstance pinstance = new MPInstance(ctx, AD_Process_ID, 0, -1, null);
- pinstance.saveEx();
-
- ProcessInfo pi = new ProcessInfo("", AD_Process_ID, 0, 0);
- pi.setAD_Client_ID(Env.getAD_Client_ID(ctx));
- pi.setAD_User_ID(Env.getAD_User_ID(ctx));
- pi.setAD_PInstance_ID(pinstance.getAD_PInstance_ID());
- //
- EnableNativeSequence proc = new EnableNativeSequence();
- proc.startProcess(ctx, pi, null);
- if (pi.isError())
- {
- throw new AdempiereException(pi.getSummary());
- }
- }
+ }
}
diff --git a/org.adempiere.base/src/org/eevolution/process/ExportFormatGenerator.java b/org.adempiere.base/src/org/eevolution/process/ExportFormatGenerator.java
index f2a10d25ff..09196af0b4 100644
--- a/org.adempiere.base/src/org/eevolution/process/ExportFormatGenerator.java
+++ b/org.adempiere.base/src/org/eevolution/process/ExportFormatGenerator.java
@@ -33,8 +33,6 @@ import org.compiere.process.SvrProcess;
import org.compiere.util.DB;
import org.compiere.util.DisplayType;
-
-
/**
* Create a Export Format from a Window
*
diff --git a/org.adempiere.base/src/org/eevolution/process/ImportInventoryMove.java b/org.adempiere.base/src/org/eevolution/process/ImportInventoryMove.java
index 48ee538324..1b6b006ef4 100644
--- a/org.adempiere.base/src/org/eevolution/process/ImportInventoryMove.java
+++ b/org.adempiere.base/src/org/eevolution/process/ImportInventoryMove.java
@@ -17,7 +17,6 @@
*****************************************************************************/
package org.eevolution.process;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -45,10 +44,8 @@ import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.eevolution.model.X_I_Movement;
-
-
/**
- * Import Inventory Movement from I_M_Movemen
+ * Import Inventory Movement from I_M_Movement
*
* @author Alberto Juarez Caballero, alberto.juarez@e-evolution.com, www.e-evolution.com
* @author victor.perez@e-evolution.com, www.e-evolution.com
@@ -78,6 +75,7 @@ public class ImportInventoryMove extends SvrProcess
/**
* Prepare - e.g., get Parameters.
*/
+ @Override
protected void prepare()
{
ProcessInfoParameter[] parameters = getParameter();
@@ -98,15 +96,14 @@ public class ImportInventoryMove extends SvrProcess
}
} // prepare
-
/**
* Perform process.
* @return Message
* @throws Exception
*/
+ @Override
protected String doIt() throws java.lang.Exception
- {
-
+ {
// Delete Old Imported
if (m_DeleteOldImported)
{
@@ -123,12 +120,10 @@ public class ImportInventoryMove extends SvrProcess
importRecords();
return "Imported: " + imported + ", Not imported: " + notimported;
} // doIt
-
-
+
/**
- * import records using I_M_Movement table
- */
-
+ * Import records using I_M_Movement table
+ */
private void importRecords()
{
if (m_IsImportOnlyNoErrors && m_ErrorsFound)
@@ -290,8 +285,7 @@ public class ImportInventoryMove extends SvrProcess
* Import Inventory Move using X_I_M_Movement table
* @param imove X_I_M_Movement
* @return MMovement
- */
-
+ */
private MMovement importMInventoryMove(X_I_Movement imove)
{
final String whereClause = I_M_Movement.COLUMNNAME_MovementDate + "= ? AND "
@@ -332,10 +326,9 @@ public class ImportInventoryMove extends SvrProcess
return move;
}
-
/**
- * fill IDs values based on Search Key
+ * Fill IDs values based on Search Key
*/
private void fillIDValues()
{
@@ -398,7 +391,7 @@ public class ImportInventoryMove extends SvrProcess
}
/**
- * get a record's ID
+ * Get a record's ID
* @param tableName String
* @param whereClause String
* @param values Object[]
@@ -409,10 +402,9 @@ public class ImportInventoryMove extends SvrProcess
return new Query(getCtx(),tableName,whereClause,get_TrxName()).setClient_ID()
.setParameters(values).firstId();
}
-
-
+
/**
- * get all records in X_I_Movement table
+ * Get all records in X_I_Movement table
* @param imported boolean
* @param isWithoutError boolean
* @return collection of X_I_Movement records
diff --git a/org.adempiere.base/src/org/eevolution/process/InvoiceCalculateTax.java b/org.adempiere.base/src/org/eevolution/process/InvoiceCalculateTax.java
index fd6ef1436a..cc319152ec 100644
--- a/org.adempiere.base/src/org/eevolution/process/InvoiceCalculateTax.java
+++ b/org.adempiere.base/src/org/eevolution/process/InvoiceCalculateTax.java
@@ -15,8 +15,6 @@
*****************************************************************************/
package org.eevolution.process;
-
-
import org.adempiere.exceptions.FillMandatoryException;
import org.compiere.model.MBPartner;
import org.compiere.model.MFactAcct;
@@ -26,10 +24,9 @@ import org.compiere.model.MProcessPara;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
-
/**
* Re-calculate Invoice Tax (and unpost the document)
- * @author victor.perez@e-evolution.com, e-Evolution http://www.e-evolution.com
+ * @author victor.perez@e-evolution.com, e-Evolution http://www.e-evolution.com
*
FR [ 2520591 ] Support multiples calendar for Org
* @see https://sourceforge.net/p/adempiere/feature-requests/631/
* @author Teo Sarca, www.arhipac.ro
@@ -74,6 +71,10 @@ public class InvoiceCalculateTax extends SvrProcess
return "@ProcessOK@";
}
+ /**
+ * Recalculate invoice tax
+ * @param invoice
+ */
public static void recalculateTax(MInvoice invoice)
{
//
diff --git a/org.adempiere.base/src/org/eevolution/process/PP_Product_BOM_Check.java b/org.adempiere.base/src/org/eevolution/process/PP_Product_BOM_Check.java
index 96c8d546f4..75febd0f29 100644
--- a/org.adempiere.base/src/org/eevolution/process/PP_Product_BOM_Check.java
+++ b/org.adempiere.base/src/org/eevolution/process/PP_Product_BOM_Check.java
@@ -31,8 +31,8 @@ import org.eevolution.model.MPPProductBOM;
import org.eevolution.model.MPPProductBOMLine;
/**
- * Title: Check BOM Structure (free of cycles) Description: Tree cannot contain
- * BOMs which are already referenced
+ * Process to Check BOM Structure (free of cycles).
+ * Tree cannot contain BOMs which are already referenced.
*
* @author Tony Snook (tspc)
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
@@ -40,13 +40,13 @@ import org.eevolution.model.MPPProductBOMLine;
@org.adempiere.base.annotation.Process
public class PP_Product_BOM_Check extends SvrProcess
{
-
/** The Record */
private int p_Record_ID = 0;
/**
* Prepare - e.g., get Parameters.
*/
+ @Override
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
@@ -66,6 +66,7 @@ public class PP_Product_BOM_Check extends SvrProcess
* @return message
* @throws Exception
*/
+ @Override
protected String doIt() throws Exception
{
log.info("Check BOM Structure");
@@ -108,6 +109,12 @@ public class PP_Product_BOM_Check extends SvrProcess
return "OK";
} // doIt
+ /**
+ * Raise exception
+ * @param string error message
+ * @param hint additional info
+ * @throws Exception
+ */
private void raiseError(String string, String hint) throws Exception
{
DB.rollback(false, get_TrxName());
diff --git a/org.adempiere.base/src/org/eevolution/process/package-info.java b/org.adempiere.base/src/org/eevolution/process/package-info.java
new file mode 100644
index 0000000000..5f2ef9c79f
--- /dev/null
+++ b/org.adempiere.base/src/org/eevolution/process/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide classes for some iDempiere process
+ */
+package org.eevolution.process;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/globalqss/process/CashFlow.java b/org.adempiere.base/src/org/globalqss/process/CashFlow.java
index 4da1407aa5..2b84b6ace1 100644
--- a/org.adempiere.base/src/org/globalqss/process/CashFlow.java
+++ b/org.adempiere.base/src/org/globalqss/process/CashFlow.java
@@ -56,6 +56,7 @@ public class CashFlow extends SvrProcess {
/**
* Prepare - e.g., get Parameters.
*/
+ @Override
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
@@ -81,6 +82,7 @@ public class CashFlow extends SvrProcess {
* @return message
* @throws Exception
*/
+ @Override
protected String doIt() throws Exception {
Calendar dateFrom = Calendar.getInstance();
diff --git a/org.adempiere.base/src/org/globalqss/process/CopyFromCashPlan.java b/org.adempiere.base/src/org/globalqss/process/CopyFromCashPlan.java
index 7b99182cda..e8246bc406 100644
--- a/org.adempiere.base/src/org/globalqss/process/CopyFromCashPlan.java
+++ b/org.adempiere.base/src/org/globalqss/process/CopyFromCashPlan.java
@@ -27,6 +27,9 @@ import org.compiere.util.AdempiereSystemError;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
+/**
+ * Process to copy cash plan lines from another cash plan
+ */
@org.adempiere.base.annotation.Process
public class CopyFromCashPlan extends SvrProcess {
@@ -36,6 +39,7 @@ public class CopyFromCashPlan extends SvrProcess {
/** Logger */
CLogger log = CLogger.getCLogger (getClass());
+ @Override
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
@@ -49,6 +53,7 @@ public class CopyFromCashPlan extends SvrProcess {
p_C_CashPlanTarget_ID = getRecord_ID();
}
+ @Override
protected String doIt() throws Exception
{
MCashPlan cptarget = new MCashPlan(getCtx(), p_C_CashPlanTarget_ID, get_TrxName());
diff --git a/org.adempiere.base/src/org/globalqss/process/GLJournalGenerate.java b/org.adempiere.base/src/org/globalqss/process/GLJournalGenerate.java
index de074d58d9..57e04bea38 100644
--- a/org.adempiere.base/src/org/globalqss/process/GLJournalGenerate.java
+++ b/org.adempiere.base/src/org/globalqss/process/GLJournalGenerate.java
@@ -90,6 +90,7 @@ public class GLJournalGenerate extends SvrProcess
/**
* Prepare - e.g., get Parameters.
*/
+ @Override
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
@@ -124,6 +125,7 @@ public class GLJournalGenerate extends SvrProcess
* @return Message
* @throws Exception
*/
+ @Override
protected String doIt() throws Exception
{
if (log.isLoggable(Level.INFO)) log.info("QSS_Journal_Generator_ID=" + p_QSS_JournalGenerator_ID
@@ -539,6 +541,11 @@ public class GLJournalGenerate extends SvrProcess
return "@OK@";
} // doIt
+ /**
+ * @param sourceAmt
+ * @param amtMultiplier
+ * @param roundFactor
+ */
private BigDecimal applyMultiplierAndFactor(BigDecimal sourceAmt, BigDecimal amtMultiplier, int roundFactor) {
if (amtMultiplier.compareTo(Env.ONE) != 0)
sourceAmt = sourceAmt.multiply(amtMultiplier, MathContext.UNLIMITED);
diff --git a/org.adempiere.base/src/org/globalqss/process/GeneratePeriodicCashPlanLines.java b/org.adempiere.base/src/org/globalqss/process/GeneratePeriodicCashPlanLines.java
index 5cc44bd86e..7f80123bc6 100644
--- a/org.adempiere.base/src/org/globalqss/process/GeneratePeriodicCashPlanLines.java
+++ b/org.adempiere.base/src/org/globalqss/process/GeneratePeriodicCashPlanLines.java
@@ -48,8 +48,9 @@ public class GeneratePeriodicCashPlanLines extends SvrProcess {
private int p_C_CashPlan_ID = 0;
/** Logger */
- CLogger log = CLogger.getCLogger (getClass());
+ protected CLogger log = CLogger.getCLogger (getClass());
+ @Override
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
@@ -83,6 +84,7 @@ public class GeneratePeriodicCashPlanLines extends SvrProcess {
p_C_CashPlan_ID = getRecord_ID();
}
+ @Override
protected String doIt() throws Exception
{
boolean usename = (p_Name != null && p_Name.trim().length() > 0);
diff --git a/org.adempiere.base/src/org/globalqss/process/package-info.java b/org.adempiere.base/src/org/globalqss/process/package-info.java
new file mode 100644
index 0000000000..05d725877d
--- /dev/null
+++ b/org.adempiere.base/src/org/globalqss/process/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide classes for some iDempiere process
+ */
+package org.globalqss.process;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/broadcast/BroadCastMsg.java b/org.adempiere.base/src/org/idempiere/broadcast/BroadCastMsg.java
index 073c9a6d08..7665ae2a1d 100644
--- a/org.adempiere.base/src/org/idempiere/broadcast/BroadCastMsg.java
+++ b/org.adempiere.base/src/org/idempiere/broadcast/BroadCastMsg.java
@@ -16,14 +16,14 @@ package org.idempiere.broadcast;
import java.io.Serializable;
/**
- *
+ * Value object for broadcast message
* @author Deepak Pansheriya
*
*/
public class BroadCastMsg implements Serializable {
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -7669279373526944539L;
diff --git a/org.adempiere.base/src/org/idempiere/broadcast/BroadCastUtil.java b/org.adempiere.base/src/org/idempiere/broadcast/BroadCastUtil.java
index ddf516198f..261a9324f3 100644
--- a/org.adempiere.base/src/org/idempiere/broadcast/BroadCastUtil.java
+++ b/org.adempiere.base/src/org/idempiere/broadcast/BroadCastUtil.java
@@ -21,6 +21,7 @@ import org.idempiere.distributed.ITopic;
import org.idempiere.distributed.ITopicSubscriber;
/**
+ * Static methods to broacast message using {@link IMessageService}.
* @author Deepak Pansheriya
*/
public class BroadCastUtil {
@@ -34,7 +35,7 @@ public class BroadCastUtil {
private static IMessageService service = null;
/**
- *
+ * Add message subscriber
* @param subscriber
*/
public static synchronized void subscribe(ITopicSubscriber subscriber){
@@ -46,7 +47,7 @@ public class BroadCastUtil {
}
/**
- *
+ * Remove message subsriber
* @param subscriber
*/
public static synchronized void unSubscribe(ITopicSubscriber subscriber){
@@ -58,7 +59,7 @@ public class BroadCastUtil {
}
/**
- *
+ * Publish message to {@link IMessageService} with topic {@link #TOPIC_BROADCAST_MESSAGE}.
* @param msg
* @return true if publish successfully
*/
@@ -72,7 +73,6 @@ public class BroadCastUtil {
}
/**
- *
* @param messageService
*/
public void bindMessageService(IMessageService messageService) {
@@ -86,7 +86,6 @@ public class BroadCastUtil {
}
/**
- *
* @param messageService
*/
public void unbindMessageService(IMessageService messageService) {
diff --git a/org.adempiere.base/src/org/idempiere/broadcast/BroadcastMsgUtil.java b/org.adempiere.base/src/org/idempiere/broadcast/BroadcastMsgUtil.java
index 6eb2e6f90a..1076638804 100644
--- a/org.adempiere.base/src/org/idempiere/broadcast/BroadcastMsgUtil.java
+++ b/org.adempiere.base/src/org/idempiere/broadcast/BroadcastMsgUtil.java
@@ -35,21 +35,18 @@ import org.compiere.util.Env;
import org.compiere.util.WebUtil;
/**
- *
+ * Static methods for broadcast message service
* @author Vivek
* @author Deepak Pansheriya
- *
*/
public class BroadcastMsgUtil
- {
-
+ {
private static final CLogger logger = CLogger
.getCLogger(BroadcastMsgUtil.class);
// BROADCAST_MESSAGE_QUEUE
-
/**
- * Publish Message
+ * Publish Broadcast Message
* @param messageID
* @param trxName
*/
@@ -112,6 +109,11 @@ public class BroadcastMsgUtil
}
+ /**
+ * Publish message using message service or using OSGi event service.
+ * @param msg message to broadcast
+ * @param isLocalOnly true to use event service, false to use message service
+ */
public static void pushToQueue(final BroadCastMsg msg, boolean isLocalOnly) {
boolean isPublished = false;
@@ -139,7 +141,7 @@ public class BroadcastMsgUtil
}
}
/**
- * Test message
+ * Broadcast Test message
* @param messageID
* @param AD_Session_ID
*/
diff --git a/org.adempiere.base/src/org/idempiere/broadcast/IBroadcastMsgPopup.java b/org.adempiere.base/src/org/idempiere/broadcast/IBroadcastMsgPopup.java
index 303623fada..d362b7809b 100644
--- a/org.adempiere.base/src/org/idempiere/broadcast/IBroadcastMsgPopup.java
+++ b/org.adempiere.base/src/org/idempiere/broadcast/IBroadcastMsgPopup.java
@@ -19,12 +19,15 @@ import java.util.ArrayList;
import org.adempiere.model.MBroadcastMessage;
/**
- *
+ * Interface to show popup broadcast message
* @author Deepak Pansheriya
- *
*/
public interface IBroadcastMsgPopup {
+ /**
+ * Process messages
+ * @param arrMessages
+ */
public void prepareMessage(ArrayList arrMessages);
}
diff --git a/org.adempiere.base/src/org/idempiere/broadcast/package-info.java b/org.adempiere.base/src/org/idempiere/broadcast/package-info.java
new file mode 100644
index 0000000000..298862c70b
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/broadcast/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide interface and classes for message broadcasting service
+ */
+package org.idempiere.broadcast;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/broadcast/process/ExpireBrodcastMessage.java b/org.adempiere.base/src/org/idempiere/broadcast/process/ExpireBrodcastMessage.java
index 8771ab72d4..8fc74a13b6 100644
--- a/org.adempiere.base/src/org/idempiere/broadcast/process/ExpireBrodcastMessage.java
+++ b/org.adempiere.base/src/org/idempiere/broadcast/process/ExpireBrodcastMessage.java
@@ -20,10 +20,9 @@ import org.compiere.util.DB;
import org.compiere.util.Env;
/**
- *
+ * Process to expire a broadcast message
* @author Vivek
* @author Deepak Pansheriya
- *
*/
@org.adempiere.base.annotation.Process
public class ExpireBrodcastMessage extends SvrProcess{
diff --git a/org.adempiere.base/src/org/idempiere/broadcast/process/PublishBrodcastMessage.java b/org.adempiere.base/src/org/idempiere/broadcast/process/PublishBrodcastMessage.java
index afe9a8c70f..705100ee4a 100644
--- a/org.adempiere.base/src/org/idempiere/broadcast/process/PublishBrodcastMessage.java
+++ b/org.adempiere.base/src/org/idempiere/broadcast/process/PublishBrodcastMessage.java
@@ -17,7 +17,7 @@ import org.idempiere.broadcast.BroadcastMsgUtil;
import org.compiere.process.SvrProcess;
/**
- *
+ * Process to publish a broadcast message
* @author Vivek
* @author Deepak Pansheriya
*
@@ -29,7 +29,6 @@ public class PublishBrodcastMessage extends SvrProcess
@Override
protected void prepare()
{
- // TODO Auto-generated method stub
}
@Override
diff --git a/org.adempiere.base/src/org/idempiere/broadcast/process/TestBrodcastMessage.java b/org.adempiere.base/src/org/idempiere/broadcast/process/TestBrodcastMessage.java
index 80492d670c..9fa65a8ed9 100644
--- a/org.adempiere.base/src/org/idempiere/broadcast/process/TestBrodcastMessage.java
+++ b/org.adempiere.base/src/org/idempiere/broadcast/process/TestBrodcastMessage.java
@@ -16,8 +16,9 @@ package org.idempiere.broadcast.process;
import org.idempiere.broadcast.BroadcastMsgUtil;
import org.compiere.process.SvrProcess;
import org.compiere.util.Env;
+
/**
- *
+ * Process to publish test broadcast message
* @author Vivek
* @author Deepak Pansheriya
*
@@ -29,7 +30,6 @@ public class TestBrodcastMessage extends SvrProcess
@Override
protected void prepare()
{
- // TODO Auto-generated method stub
}
@Override
diff --git a/org.adempiere.base/src/org/idempiere/broadcast/process/package-info.java b/org.adempiere.base/src/org/idempiere/broadcast/process/package-info.java
new file mode 100644
index 0000000000..65f777fda2
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/broadcast/process/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide process class for broadcasting of message
+ */
+package org.idempiere.broadcast.process;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/cache/ImmutableIntPOCache.java b/org.adempiere.base/src/org/idempiere/cache/ImmutableIntPOCache.java
index 32277532b0..4411b99a9a 100644
--- a/org.adempiere.base/src/org/idempiere/cache/ImmutableIntPOCache.java
+++ b/org.adempiere.base/src/org/idempiere/cache/ImmutableIntPOCache.java
@@ -35,7 +35,7 @@ import org.compiere.model.PO;
public class ImmutableIntPOCache extends ImmutablePOCache {
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -6605758049101851103L;
diff --git a/org.adempiere.base/src/org/idempiere/cache/ImmutablePOCache.java b/org.adempiere.base/src/org/idempiere/cache/ImmutablePOCache.java
index 82bb7030b1..44c8ef732a 100644
--- a/org.adempiere.base/src/org/idempiere/cache/ImmutablePOCache.java
+++ b/org.adempiere.base/src/org/idempiere/cache/ImmutablePOCache.java
@@ -36,8 +36,8 @@ import org.compiere.util.Env;
import org.compiere.util.Util;
/**
- * Thread safe PO cache. For thread safety, only PO with thread local context (po.getCtx() == Env.getCtx() and without trxName is keep in cache.
- * PO is mark immutable before being added to cache. If the pass in PO doesn't match the 2 condition, a copy of the PO is added to cache instead.
+ * Thread safe PO cache. For thread safety, only PO with thread local context (po.getCtx() == Env.getCtx() and without trxName is keep in cache.
+ * PO is mark immutable before being added to cache. If the pass in PO doesn't match the 2 condition, a copy of the PO is added to cache instead.
* For get operation, if request is being make with non thread local context (ctx != Env.getCtx()) or with trxName, a copy of the PO from cache
* is return instead.
*
@@ -46,12 +46,11 @@ import org.compiere.util.Util;
public class ImmutablePOCache extends CCache {
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -3342469152066078741L;
/**
- *
* @param name
* @param initialCapacity
* @param expireMinutes
@@ -63,7 +62,6 @@ public class ImmutablePOCache extends CCac
}
/**
- *
* @param name
* @param initialCapacity
* @param expireMinutes
@@ -74,7 +72,6 @@ public class ImmutablePOCache extends CCac
}
/**
- *
* @param name
* @param initialCapacity
* @param expireMinutes
@@ -84,7 +81,6 @@ public class ImmutablePOCache extends CCac
}
/**
- *
* @param name
* @param initialCapacity
*/
@@ -93,7 +89,6 @@ public class ImmutablePOCache extends CCac
}
/**
- *
* @param tableName
* @param name
* @param initialCapacity
@@ -104,7 +99,6 @@ public class ImmutablePOCache extends CCac
}
/**
- *
* @param tableName
* @param name
* @param initialCapacity
@@ -118,7 +112,6 @@ public class ImmutablePOCache extends CCac
}
/**
- *
* @param tableName
* @param name
* @param initialCapacity
@@ -130,7 +123,6 @@ public class ImmutablePOCache extends CCac
}
/**
- *
* @param tableName
* @param name
* @param initialCapacity
@@ -145,8 +137,8 @@ public class ImmutablePOCache extends CCac
}
/**
- * PO is mark immutable and add to cache if it is without trxName and with thread local context (i.e po.getCtx() == Env.getCtx()).
- * If neither of the condition is not true, a copy of the PO will be created and add to cache using the pass copyOperator or
+ * PO is mark immutable and add to cache if it is without trxName and with thread local context (i.e po.getCtx() == Env.getCtx()).
+ * If either of the condition is not true, a copy of the PO will be created and add to cache using the pass in copyOperator or
* through copy constructor (through reflection) if copyOperator parameter is null (exception is throw if both copyOperator and
* copy constructor is not available).
* @param key
@@ -251,6 +243,17 @@ public class ImmutablePOCache extends CCac
}
}
+ /**
+ * Create a copy of value using copy constructor
+ * @param ctx
+ * @param value
+ * @param trxName
+ * @return copy of value or null
+ * @throws NoSuchMethodException
+ * @throws InstantiationException
+ * @throws IllegalAccessException
+ * @throws InvocationTargetException
+ */
@SuppressWarnings("unchecked")
private V copyOf(Properties ctx, V value, String trxName)
throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException {
@@ -263,6 +266,16 @@ public class ImmutablePOCache extends CCac
return null;
}
+ /**
+ * Create a copy of value using copy constructor
+ * @param ctx
+ * @param value
+ * @return copy of value or null
+ * @throws NoSuchMethodException
+ * @throws InstantiationException
+ * @throws IllegalAccessException
+ * @throws InvocationTargetException
+ */
@SuppressWarnings("unchecked")
private V copyOf(Properties ctx, V value)
throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException {
diff --git a/org.adempiere.base/src/org/idempiere/cache/ImmutablePOSupport.java b/org.adempiere.base/src/org/idempiere/cache/ImmutablePOSupport.java
index 5e6a8bfbcd..04805fe392 100644
--- a/org.adempiere.base/src/org/idempiere/cache/ImmutablePOSupport.java
+++ b/org.adempiere.base/src/org/idempiere/cache/ImmutablePOSupport.java
@@ -28,7 +28,7 @@ package org.idempiere.cache;
import org.compiere.model.PO;
/**
- * Model class that support immutable should implement this interface
+ * Model class that support immutable cache should implement this interface
* @author hengsin
*
*/
diff --git a/org.adempiere.base/src/org/idempiere/cache/IntPOCopyCache.java b/org.adempiere.base/src/org/idempiere/cache/IntPOCopyCache.java
index d8363a48f4..766ecaf5a7 100644
--- a/org.adempiere.base/src/org/idempiere/cache/IntPOCopyCache.java
+++ b/org.adempiere.base/src/org/idempiere/cache/IntPOCopyCache.java
@@ -35,7 +35,7 @@ import org.compiere.model.PO;
public class IntPOCopyCache extends POCopyCache {
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 606664825366527176L;
diff --git a/org.adempiere.base/src/org/idempiere/cache/POCopyCache.java b/org.adempiere.base/src/org/idempiere/cache/POCopyCache.java
index 246bc846c6..32708f85c1 100644
--- a/org.adempiere.base/src/org/idempiere/cache/POCopyCache.java
+++ b/org.adempiere.base/src/org/idempiere/cache/POCopyCache.java
@@ -43,12 +43,11 @@ import org.compiere.util.Util;
public class POCopyCache extends CCache {
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 7463584909438958260L;
/**
- *
* @param name
* @param initialCapacity
* @param expireMinutes
@@ -60,7 +59,6 @@ public class POCopyCache extends CCache {
}
/**
- *
* @param name
* @param initialCapacity
* @param expireMinutes
@@ -71,7 +69,6 @@ public class POCopyCache extends CCache {
}
/**
- *
* @param name
* @param initialCapacity
* @param expireMinutes
@@ -81,7 +78,6 @@ public class POCopyCache extends CCache {
}
/**
- *
* @param name
* @param initialCapacity
*/
@@ -90,7 +86,6 @@ public class POCopyCache extends CCache {
}
/**
- *
* @param tableName
* @param name
* @param initialCapacity
@@ -115,7 +110,6 @@ public class POCopyCache extends CCache {
}
/**
- *
* @param tableName
* @param name
* @param initialCapacity
@@ -127,7 +121,6 @@ public class POCopyCache extends CCache {
}
/**
- *
* @param tableName
* @param name
* @param initialCapacity
@@ -192,6 +185,7 @@ public class POCopyCache extends CCache {
}
/**
+ * Get a copy of PO from cache using copy constructor
* @param ctx context
* @param key
* @return value for key
@@ -201,6 +195,7 @@ public class POCopyCache extends CCache {
}
/**
+ * Get a copy of PO from cache using copy constructor
* @param ctx context
* @param key
* @param trxName
@@ -238,7 +233,7 @@ public class POCopyCache extends CCache {
* Get PO from cache. A copy of the cached PO is return
* @param key
* @param copyOperator operator to call copy constructor
- * @return PO from cache (if there's match for key)
+ * @return copy of PO from cache (if there's match for key)
*/
public V get(K key, UnaryOperator copyOperator) {
V value = super.get(key);
@@ -249,6 +244,17 @@ public class POCopyCache extends CCache {
return copy;
}
+ /**
+ * Create a copy of value using copy constructor
+ * @param ctx
+ * @param value
+ * @param trxName
+ * @return copy of value or null
+ * @throws NoSuchMethodException
+ * @throws InstantiationException
+ * @throws IllegalAccessException
+ * @throws InvocationTargetException
+ */
@SuppressWarnings("unchecked")
private V copyOf(Properties ctx, V value, String trxName)
throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException {
@@ -261,6 +267,16 @@ public class POCopyCache extends CCache {
return null;
}
+ /**
+ * Create a copy of value using copy constructor
+ * @param ctx
+ * @param value
+ * @return copy of value or null
+ * @throws NoSuchMethodException
+ * @throws InstantiationException
+ * @throws IllegalAccessException
+ * @throws InvocationTargetException
+ */
@SuppressWarnings("unchecked")
private V copyOf(Properties ctx, V value)
throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException {
diff --git a/org.adempiere.base/src/org/idempiere/cache/package-info.java b/org.adempiere.base/src/org/idempiere/cache/package-info.java
new file mode 100644
index 0000000000..6d5679f182
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/cache/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide interface and classes for thread safe PO cache implementation
+ */
+package org.idempiere.cache;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/db/util/AutoCommitConnectionBroker.java b/org.adempiere.base/src/org/idempiere/db/util/AutoCommitConnectionBroker.java
index 76b80f2252..456313064e 100644
--- a/org.adempiere.base/src/org/idempiere/db/util/AutoCommitConnectionBroker.java
+++ b/org.adempiere.base/src/org/idempiere/db/util/AutoCommitConnectionBroker.java
@@ -19,11 +19,12 @@ import java.sql.SQLException;
import org.compiere.util.DB;
/**
- * This class managed the sharing of non-transactional connection per thread.
+ * This class managed the sharing of non-transaction connection per thread.
* @author hengsin
*
*/
public class AutoCommitConnectionBroker {
+ /** Thread local connection reference */
private static ThreadLocal threadLocalConnection = new ThreadLocal() {
protected ConnectionReference initialValue()
{
@@ -32,7 +33,7 @@ public class AutoCommitConnectionBroker {
};
/**
- * Retrieve non-transactional connection for current thread.
+ * Retrieve non-transaction connection for current thread.
* If none have been allocated yet, a new one will be created from the connection pool.
* @return Connection
*/
@@ -52,7 +53,7 @@ public class AutoCommitConnectionBroker {
}
/**
- * Release connection. The connection goes back to pool if reference count is zero.
+ * Release connection. The connection goes back to connection pool if reference count is zero.
* @param conn
*/
public static void releaseConnection(Connection conn) {
@@ -72,6 +73,7 @@ public class AutoCommitConnectionBroker {
}
}
+ /** Value object for connection reference */
private static class ConnectionReference {
protected Connection connection;
protected int referenceCount;
diff --git a/org.adempiere.base/src/org/idempiere/db/util/package-info.java b/org.adempiere.base/src/org/idempiere/db/util/package-info.java
new file mode 100644
index 0000000000..33071a66e3
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/db/util/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide utility classes for DB interaction
+ */
+package org.idempiere.db.util;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/distributed/ICacheService.java b/org.adempiere.base/src/org/idempiere/distributed/ICacheService.java
index 4cc393176f..0f93444b14 100644
--- a/org.adempiere.base/src/org/idempiere/distributed/ICacheService.java
+++ b/org.adempiere.base/src/org/idempiere/distributed/ICacheService.java
@@ -1,3 +1,24 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.distributed;
import java.util.List;
@@ -5,16 +26,38 @@ import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
+/**
+ * Interface for distributed cache service
+ */
public interface ICacheService {
+ /**
+ * Get map for distributed cache
+ * @param
+ * @param
+ * @param name
+ * @return map for distributed cache
+ */
public Map getMap(String name);
+ /**
+ * Get list for distributed cache
+ * @param
+ * @param name
+ * @return list for distributed cache
+ */
public List getList(String name);
+ /**
+ * Get set for distributed cache
+ * @param
+ * @param name
+ * @return set for distributed cache
+ */
public Set getSet(String name);
/**
- * Tries to acquire the lock for the specified key.
+ * Tries to acquire the lock for a specified key.
* If the lock is not available, then the current thread becomes disabled for thread scheduling purposes and lies dormant
* until one of two things happens - the lock is acquired by the current thread, or the specified waiting time elapses.
*
@@ -28,8 +71,9 @@ public interface ICacheService {
public boolean tryLock(Map map, K key, long timeout, TimeUnit timeunit) throws InterruptedException;
/**
- * Releases the lock for the specified key. It never blocks and returns immediately. If the current thread is the holder
- * of this lock, then the hold count is decremented. If the hold count is zero, then the lock is released.
+ * Releases the lock for the specified key. It never blocks and returns immediately.
+ * If the current thread is the holder of this lock, then the hold count is decremented.
+ * If the hold count is zero, then the lock is released.
* If the current thread is not the holder of this lock, then IllegalMonitorStateException is thrown.
*
* @param map
diff --git a/org.adempiere.base/src/org/idempiere/distributed/IClusterMember.java b/org.adempiere.base/src/org/idempiere/distributed/IClusterMember.java
index ceb56e344f..16b442eeab 100644
--- a/org.adempiere.base/src/org/idempiere/distributed/IClusterMember.java
+++ b/org.adempiere.base/src/org/idempiere/distributed/IClusterMember.java
@@ -1,9 +1,47 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.distributed;
import java.net.InetAddress;
+/**
+ * Interface for cluster member node
+ */
public interface IClusterMember {
+ /**
+ * Get node id
+ * @return node id
+ */
public String getId();
+
+ /**
+ * Get node address
+ * @return node address
+ */
public InetAddress getAddress();
+
+ /**
+ * Get node port
+ * @return node port
+ */
public int getPort();
}
diff --git a/org.adempiere.base/src/org/idempiere/distributed/IClusterService.java b/org.adempiere.base/src/org/idempiere/distributed/IClusterService.java
index f58c09adb0..71bf422d2b 100644
--- a/org.adempiere.base/src/org/idempiere/distributed/IClusterService.java
+++ b/org.adempiere.base/src/org/idempiere/distributed/IClusterService.java
@@ -1,3 +1,24 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.distributed;
import java.util.Collection;
@@ -6,25 +27,25 @@ import java.util.concurrent.Callable;
import java.util.concurrent.Future;
/**
- *
+ * Interface for cluster service
* @author hengsin
- *
*/
public interface IClusterService {
/**
- *
+ * Get member nodes
* @return Collection of cluster member
*/
public Collection getMembers();
/**
+ * Get local node
* @return Local node
*/
public IClusterMember getLocalMember();
/**
- *
+ * Execute task on specific member
* @param task
* @param member
* @return Future
@@ -32,7 +53,7 @@ public interface IClusterService {
public Future execute(Callable task, IClusterMember member);
/**
- *
+ * Execute task on the list of members
* @param task
* @param members
* @return Map of IClusterMember and Future
@@ -40,7 +61,7 @@ public interface IClusterService {
public Map> execute(Callable task, Collection members);
/**
- *
+ * Is instance stand alone
* @return true if instance is stand alone
*/
public default boolean isStandAlone() {
diff --git a/org.adempiere.base/src/org/idempiere/distributed/IMessageService.java b/org.adempiere.base/src/org/idempiere/distributed/IMessageService.java
index 16a7a9d0c1..d25f5d35fe 100644
--- a/org.adempiere.base/src/org/idempiere/distributed/IMessageService.java
+++ b/org.adempiere.base/src/org/idempiere/distributed/IMessageService.java
@@ -1,5 +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. *
+ **********************************************************************/
package org.idempiere.distributed;
+/**
+ * Messaging service interface
+ */
public interface IMessageService {
+ /**
+ * Get or create message topic by name
+ * @param
+ * @param name topic name
+ * @return messaging topic interface
+ */
public ITopic getTopic(String name);
}
diff --git a/org.adempiere.base/src/org/idempiere/distributed/ITopic.java b/org.adempiere.base/src/org/idempiere/distributed/ITopic.java
index 615a708a06..3387468f52 100644
--- a/org.adempiere.base/src/org/idempiere/distributed/ITopic.java
+++ b/org.adempiere.base/src/org/idempiere/distributed/ITopic.java
@@ -1,15 +1,52 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.distributed;
/**
+ * Messaging topic interface
* @author hengsin
- *
*/
public interface ITopic {
+ /**
+ * Get topic name
+ * @return topic name
+ */
public String getName();
+
+ /**
+ * Subscribe to this messaging topic
+ * @param subscriber
+ */
public void subscribe(ITopicSubscriber subscriber);
+
+ /**
+ * Unsubscribe subscriber from this messaging topic
+ * @param subscriber
+ */
public void unsubscribe(ITopicSubscriber subscriber);
+
+ /**
+ * Publish message to this messaging topic
+ * @param message
+ */
public void publish(T message);
}
diff --git a/org.adempiere.base/src/org/idempiere/distributed/ITopicSubscriber.java b/org.adempiere.base/src/org/idempiere/distributed/ITopicSubscriber.java
index adce012642..d6afe9ac2e 100644
--- a/org.adempiere.base/src/org/idempiere/distributed/ITopicSubscriber.java
+++ b/org.adempiere.base/src/org/idempiere/distributed/ITopicSubscriber.java
@@ -1,5 +1,34 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.distributed;
+/**
+ * Messaging topic subscriber interface
+ * @param
+ */
public interface ITopicSubscriber {
+ /**
+ * On receive of message
+ * @param message
+ */
public void onMessage(T message);
}
diff --git a/org.adempiere.base/src/org/idempiere/distributed/package-info.java b/org.adempiere.base/src/org/idempiere/distributed/package-info.java
new file mode 100644
index 0000000000..85ae2ffc28
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/distributed/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide interface for iDempiere distributed services (cache, cluster and messaging)
+ */
+package org.idempiere.distributed;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/exceptions/NoCurrencyConversionException.java b/org.adempiere.base/src/org/idempiere/exceptions/NoCurrencyConversionException.java
index a05ee670a6..c525a0bd14 100644
--- a/org.adempiere.base/src/org/idempiere/exceptions/NoCurrencyConversionException.java
+++ b/org.adempiere.base/src/org/idempiere/exceptions/NoCurrencyConversionException.java
@@ -29,14 +29,12 @@ import org.compiere.util.Env;
*/
public class NoCurrencyConversionException extends AdempiereException
{
-
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 1593966161685137709L;
/**
- *
* @param C_Currency_ID
* @param C_Currency_ID_To
* @param ConvDate
@@ -55,6 +53,15 @@ public class NoCurrencyConversionException extends AdempiereException
AD_Client_ID, AD_Org_ID));
}
+ /**
+ * @param C_Currency_ID
+ * @param C_Currency_ID_To
+ * @param ConvDate
+ * @param C_ConversionType_ID
+ * @param AD_Client_ID
+ * @param AD_Org_ID
+ * @return message
+ */
private static final String buildMessage(int C_Currency_ID, int C_Currency_ID_To,
Timestamp ConvDate,
int C_ConversionType_ID,
diff --git a/org.adempiere.base/src/org/idempiere/exceptions/package-info.java b/org.adempiere.base/src/org/idempiere/exceptions/package-info.java
new file mode 100644
index 0000000000..87d1f3efec
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/exceptions/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide exception classes
+ */
+package org.idempiere.exceptions;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/expression/logic/EvaluationVisitor.java b/org.adempiere.base/src/org/idempiere/expression/logic/EvaluationVisitor.java
index f70a9b63a5..0caa9d8bf3 100644
--- a/org.adempiere.base/src/org/idempiere/expression/logic/EvaluationVisitor.java
+++ b/org.adempiere.base/src/org/idempiere/expression/logic/EvaluationVisitor.java
@@ -45,9 +45,8 @@ import org.idempiere.expression.logic.SimpleBooleanParser.QuotedTextContext;
import org.idempiere.expression.logic.SimpleBooleanParser.TextContext;
/**
- *
+ * Boolean expression visitor
* @author hengsin
- *
*/
public class EvaluationVisitor extends SimpleBooleanBaseVisitor {
diff --git a/org.adempiere.base/src/org/idempiere/expression/logic/LogicEvaluator.java b/org.adempiere.base/src/org/idempiere/expression/logic/LogicEvaluator.java
index 0c8708d15f..60c1240817 100644
--- a/org.adempiere.base/src/org/idempiere/expression/logic/LogicEvaluator.java
+++ b/org.adempiere.base/src/org/idempiere/expression/logic/LogicEvaluator.java
@@ -33,9 +33,8 @@ import org.compiere.util.CLogger;
import org.compiere.util.Evaluatee;
/**
- *
+ * Static method for evaluation of logic expression
* @author hengsin
- *
*/
public final class LogicEvaluator {
@@ -45,25 +44,26 @@ public final class LogicEvaluator {
}
/**
- * Evaluate Logic.
+ * Evaluate Logic Expression.
+ *
* {@code
- * format: ( []).
+ * format: ( []).
* : $!.
- * : @@.
- * : | or & (Example '@AD_Table@=Test | @Language@=GERGER).
+ * : @@.
+ * : | or & (Example '@AD_Table@=Test | @Language@=GERGER).
* : = | ! | ^ | < | > | <= | >= | ~ (Equal, Not Equal, Not Equal, Less Than,
* Greater Than, Less Than or Equal, Greater Than or Equal, Regular Expression Match).
* : ~ ''.
* : value1,value2,value3 (Example '@CalculationType@=A,R,S').
- * : any global or window context.
- * : strings can be with ' or ".
- * : AND or OR with the previous result from left to right.
+ * : any global or window context.
+ * : strings can be with ' or ".
+ * : AND or OR with the previous result from left to right.
* <()>: override the default left to right evaluation order (Example '@GrandTotal@=0 |(@GrandTotal@>0 & @PaymentRule@=X)").
- *
* }
+ *
* @param source class implementing get_ValueAsString(variable)
- * @param logic logic string
- * @return logic result
+ * @param logic logic expression
+ * @return logic evaluation result
*/
public static boolean evaluateLogic (Evaluatee source, String logic) {
SimpleBooleanLexer lexer = new SimpleBooleanLexer(CharStreams.fromString(logic));
@@ -86,7 +86,7 @@ public final class LogicEvaluator {
}
/**
- * Throw exception if logic is not valid
+ * Throw exception if logic expression is not valid
* @param logic
* @throws ParseCancellationException
*/
diff --git a/org.adempiere.base/src/org/idempiere/expression/logic/ThrowingErrorListener.java b/org.adempiere.base/src/org/idempiere/expression/logic/ThrowingErrorListener.java
index fa687a17c0..8159d18c00 100644
--- a/org.adempiere.base/src/org/idempiere/expression/logic/ThrowingErrorListener.java
+++ b/org.adempiere.base/src/org/idempiere/expression/logic/ThrowingErrorListener.java
@@ -30,9 +30,8 @@ import org.antlr.v4.runtime.Recognizer;
import org.antlr.v4.runtime.misc.ParseCancellationException;
/**
- *
+ * Syntax error listener
* @author hengsin
- *
*/
public class ThrowingErrorListener extends BaseErrorListener {
diff --git a/org.adempiere.base/src/org/idempiere/expression/logic/package-info.java b/org.adempiere.base/src/org/idempiere/expression/logic/package-info.java
new file mode 100644
index 0000000000..a13f4a9bf9
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/expression/logic/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide antlr based implementation of iDempiere logic expression evaluation
+ */
+package org.idempiere.expression.logic;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetAlreadyDepreciatedException.java b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetAlreadyDepreciatedException.java
index 02bafe784c..d00b3ee920 100644
--- a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetAlreadyDepreciatedException.java
+++ b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetAlreadyDepreciatedException.java
@@ -1,9 +1,26 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.exceptions;
-
/**
* Asset is already depreciated and this is an issue for the action that invoked this exception
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
@@ -11,9 +28,8 @@ package org.idempiere.fa.exceptions;
*/
public class AssetAlreadyDepreciatedException extends AssetException
{
-
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -2531645693567226455L;
diff --git a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetArrayException.java b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetArrayException.java
index 056987833a..080e46a8c5 100644
--- a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetArrayException.java
+++ b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetArrayException.java
@@ -1,26 +1,50 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.exceptions;
import java.util.List;
/**
* @author Teo Sarca, www.arhipac.ro
- *
*/
public class AssetArrayException extends AssetException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -6145405299338077726L;
+ /**
+ * @param errors
+ */
public AssetArrayException(List errors)
{
super(buildMessage(errors));
}
+ /**
+ * @param errors
+ * @return message
+ */
private static String buildMessage(List errors)
{
StringBuilder sb = new StringBuilder("The following errors were encountered: "); // TODO: translate
diff --git a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetCheckDocumentException.java b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetCheckDocumentException.java
index 27680144c2..06d09a0ffe 100644
--- a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetCheckDocumentException.java
+++ b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetCheckDocumentException.java
@@ -1,21 +1,39 @@
-/**
- *
- */
+ /***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.exceptions;
-
/**
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
- *
*/
public class AssetCheckDocumentException extends AssetException
{
-
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -8096988198983528889L;
+ /**
+ * @param additionalMessage
+ */
public AssetCheckDocumentException(String additionalMessage)
{
super ("@CheckDocument@ - "+additionalMessage); // TODO: AD_Message
diff --git a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetException.java b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetException.java
index e1e6473f69..ef015ecce1 100644
--- a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetException.java
+++ b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetException.java
@@ -1,6 +1,24 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.exceptions;
import org.adempiere.exceptions.AdempiereException;
@@ -11,9 +29,8 @@ import org.adempiere.exceptions.AdempiereException;
*/
public class AssetException extends AdempiereException
{
-
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -2163958702697438015L;
@@ -22,16 +39,26 @@ public class AssetException extends AdempiereException
super();
}
+ /**
+ * @param message
+ */
public AssetException(String message)
{
super(message);
}
+ /**
+ * @param cause
+ */
public AssetException(Throwable cause)
{
super(cause);
}
+ /**
+ * @param message
+ * @param cause
+ */
public AssetException(String message, Throwable cause)
{
super(message, cause);
diff --git a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetInvalidTransitionException.java b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetInvalidTransitionException.java
index 055bf78436..6a7d0e860d 100644
--- a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetInvalidTransitionException.java
+++ b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetInvalidTransitionException.java
@@ -1,26 +1,46 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.exceptions;
import org.compiere.model.MAsset;
import org.compiere.model.MRefList;
-
/**
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
- *
*/
public class AssetInvalidTransitionException extends AssetException
{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -4356632909207763285L;
private String oldStatus = null;
private String newStatus = null;
+ /**
+ * @param oldStatus
+ * @param newStatus
+ */
public AssetInvalidTransitionException(String oldStatus, String newStatus)
{
super("@AssetInvalidTransition@ @"+oldStatus+"@ -> @"+newStatus+"@");
@@ -28,7 +48,7 @@ public class AssetInvalidTransitionException extends AssetException
this.newStatus = newStatus;
}
-
+ @Override
public String getLocalizedMessage()
{
String msg = super.getLocalizedMessage();
diff --git a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetNotActiveException.java b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetNotActiveException.java
index 5589ce5da5..c21ea9dde3 100644
--- a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetNotActiveException.java
+++ b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetNotActiveException.java
@@ -1,20 +1,39 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.exceptions;
/**
* @author Teo Sarca, www.arhipac.ro
- *
*/
public class AssetNotActiveException extends AssetException
{
-
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -958395266586669844L;
+ /**
+ * @param A_Asset_ID
+ */
public AssetNotActiveException(int A_Asset_ID)
{
super("@AssetNotActive@ (ID="+A_Asset_ID+")");
diff --git a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetNotImplementedException.java b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetNotImplementedException.java
index a4a274f8ab..8496feea1c 100644
--- a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetNotImplementedException.java
+++ b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetNotImplementedException.java
@@ -1,22 +1,40 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.exceptions;
-
/**
- * Throwed when an asset related functionality is not yet implemented
+ * Throw when an asset related functionality is not yet implemented
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
- *
*/
public class AssetNotImplementedException extends AssetException
{
-
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -7015542410574849684L;
+ /**
+ * @param additionalMessage
+ */
public AssetNotImplementedException(String additionalMessage)
{
super("@NotImplemented@ "+additionalMessage);
diff --git a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetNotSupportedException.java b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetNotSupportedException.java
index 8f2d1d1d34..5ee8399322 100644
--- a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetNotSupportedException.java
+++ b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetNotSupportedException.java
@@ -1,17 +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. *
+ **********************************************************************/
package org.idempiere.fa.exceptions;
-
/**
- * Throwed when a specific functionality is not supported.
- * Please don't confunde with {@link AssetNotImplementedException}.
+ * Throw when a specific functionality is not supported.
+ * Please don't confuse with {@link AssetNotImplementedException}.
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
- *
*/
public class AssetNotSupportedException extends AssetException
{
-
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -9182818872935345775L;
diff --git a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetProductStockedException.java b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetProductStockedException.java
index 29011ac230..3e38af5590 100644
--- a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetProductStockedException.java
+++ b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetProductStockedException.java
@@ -1,22 +1,41 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.exceptions;
import org.compiere.model.MProduct;
/**
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
- *
*/
public class AssetProductStockedException extends AssetException
{
-
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = 229246069558704158L;
+ /**
+ * @param product
+ */
public AssetProductStockedException(MProduct product)
{
super("Product "+product.getName()+" is the asset type, but is stocked!");
diff --git a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetStatusChangedException.java b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetStatusChangedException.java
index a41596ab2a..e5b0486479 100644
--- a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetStatusChangedException.java
+++ b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetStatusChangedException.java
@@ -1,19 +1,36 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.exceptions;
import org.compiere.util.Util;
/**
- * Threw when asset status has changed
+ * Throw when asset status has changed
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
*/
public class AssetStatusChangedException extends AssetException
{
-
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -2015948851153849647L;
@@ -22,11 +39,18 @@ public class AssetStatusChangedException extends AssetException
this(null);
}
+ /**
+ * @param msg
+ */
public AssetStatusChangedException(String msg)
{
super(buildMsg(msg));
}
+ /**
+ * @param msg
+ * @return message
+ */
private static String buildMsg(String msg)
{
StringBuilder sb = new StringBuilder("@AssetStatusChanged@");
diff --git a/org.adempiere.base/src/org/idempiere/fa/exceptions/DepreciationNoInPeriodException.java b/org.adempiere.base/src/org/idempiere/fa/exceptions/DepreciationNoInPeriodException.java
index f5f7fe2680..011031ada5 100644
--- a/org.adempiere.base/src/org/idempiere/fa/exceptions/DepreciationNoInPeriodException.java
+++ b/org.adempiere.base/src/org/idempiere/fa/exceptions/DepreciationNoInPeriodException.java
@@ -1,20 +1,41 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.exceptions;
/**
* @author teo_sarca
- *
*/
public class DepreciationNoInPeriodException extends AssetException
-{
-
+{
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -6201871355182540721L;
+ /**
+ * @param A_Asset_ID
+ * @param Workfile_Period_ID
+ * @param DepExp_Period_ID
+ */
public DepreciationNoInPeriodException(int A_Asset_ID, int Workfile_Period_ID, int DepExp_Period_ID)
{
super("Registration is not in balance (ID Asset="+A_Asset_ID
diff --git a/org.adempiere.base/src/org/idempiere/fa/exceptions/package-info.java b/org.adempiere.base/src/org/idempiere/fa/exceptions/package-info.java
new file mode 100644
index 0000000000..480f429651
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/fa/exceptions/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide exception classes for fixed asset
+ */
+package org.idempiere.fa.exceptions;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/fa/feature/UseLife.java b/org.adempiere.base/src/org/idempiere/fa/feature/UseLife.java
index c42d07c309..331cd84b09 100644
--- a/org.adempiere.base/src/org/idempiere/fa/feature/UseLife.java
+++ b/org.adempiere.base/src/org/idempiere/fa/feature/UseLife.java
@@ -1,18 +1,36 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.feature;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.model.SetGetModel;
-
- /** Describe Use life Feature
- * @author Teo Sarca, SC Arhipac SRL
- * @version $Id$
- */
- public interface UseLife extends SetGetModel {
+/**
+ * Describe Use life Feature
+ * @author Teo Sarca, SC Arhipac SRL
+ * @version $Id$
+ */
+public interface UseLife extends SetGetModel {
public Properties getCtx();
//~ public void setUseLifeMonths(int value);
diff --git a/org.adempiere.base/src/org/idempiere/fa/feature/UseLifeImpl.java b/org.adempiere.base/src/org/idempiere/fa/feature/UseLifeImpl.java
index a098d8d9b7..3159203f3d 100644
--- a/org.adempiere.base/src/org/idempiere/fa/feature/UseLifeImpl.java
+++ b/org.adempiere.base/src/org/idempiere/fa/feature/UseLifeImpl.java
@@ -1,6 +1,24 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.feature;
import java.math.BigDecimal;
@@ -20,13 +38,11 @@ import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.TimeUtil;
-
-
- /**
- * Asset properties - classification of assets, service period, life use.
- * @author Teo Sarca, SC ARHIPAC SERVICE SRL
- * @version $Id$
- */
+/**
+ * Asset properties - classification of assets, service period, life use.
+ * @author Teo Sarca, SC ARHIPAC SERVICE SRL
+ * @version $Id$
+ */
public class UseLifeImpl
implements UseLife
{
@@ -40,18 +56,23 @@ public class UseLifeImpl
private boolean fiscal = false;
/**
+ * @param obj model
*/
public static UseLifeImpl get(SetGetModel obj) {
return new UseLifeImpl(obj, false);
}
/**
+ * @param obj model
+ * @param fiscal
*/
public static UseLifeImpl get(SetGetModel obj, boolean fiscal) {
return new UseLifeImpl(obj, fiscal);
}
/**
+ * @param obj model
+ * @param fiscal
*/
public UseLifeImpl(SetGetModel obj, boolean fiscal) {
m_obj = obj;
@@ -59,20 +80,31 @@ public class UseLifeImpl
}
/**
+ * @return context
*/
public Properties getCtx() {
return m_obj.getCtx();
}
+ /**
+ * Get table id of model
+ * @return AD_Table_ID
+ */
public int get_Table_ID() {
return m_obj.get_Table_ID();
}
+ /**
+ * Get table name of model
+ * @return table name
+ */
public String get_TableName() {
return m_obj.get_TableName();
}
/**
+ * @param fieldName
+ * @param fiscal
*/
private final static String getFieldName(String fieldName, boolean fiscal) {
String field = fieldName;
@@ -83,24 +115,34 @@ public class UseLifeImpl
}
/**
+ * @return true if this is fiscal
*/
public boolean isFiscal() {
return fiscal;
}
/**
+ * Set attribute value
+ * @param name
+ * @param value
*/
public boolean set_AttrValue(String name, Object value) {
return m_obj.set_AttrValue(name, value);
}
/**
+ * Get attribute value
+ * @param name
+ * @return value
*/
public Object get_AttrValue(String name) {
return m_obj.get_AttrValue(name);
}
/**
+ * Is attribute changed
+ * @param name
+ * @return true if attribute has change
*/
public boolean is_AttrValueChanged(String name) {
return m_obj.is_AttrValueChanged(name);
@@ -113,8 +155,9 @@ public class UseLifeImpl
return m_obj.get_TrxName();
}
- /** Set UseLifeMonths and UseLifeYears
- * @param value use life months
+ /**
+ * Set UseLifeMonths and UseLifeYears
+ * @param value use life months
*/
public void setUseLifeMonths(int value) {
if (log.isLoggable(Level.FINE)) log.fine("Entering: value=" + value + ", " + this);
@@ -134,7 +177,8 @@ public class UseLifeImpl
return 0;
}
- /** Set UseLifeYears and UseLifeMonths
+ /**
+ * Set UseLifeYears and UseLifeMonths
* @param value use life years
*/
public void setUseLifeYears(BigDecimal value) {
@@ -183,28 +227,6 @@ public class UseLifeImpl
return null;
}
- /**
- * @return asset class ID
- */
- /* commented out by @win
- public int getA_Asset_Class_ID()
- {
- if (m_obj instanceof UseLife)
- {
- return ((UseLife)m_obj).getA_Asset_Class_ID();
- }
- else
- {
- Object obj = m_obj.get_AttrValue("A_Asset_Class_ID");
- if (obj != null && obj instanceof Number)
- {
- return ((Number)obj).intValue();
- }
- }
- return 0;
- }
- */ // end comment by @win
-
/**
* Copy UseLifeMonths, UseLifeMonths_F, UseLifeYears, UseLifeYears_F fields from "from" to "to"
* @param to destination model
@@ -232,25 +254,10 @@ public class UseLifeImpl
useLifeMonths = useLifeYears.multiply(TWELVE).intValue();
}
useLifeYears = BigDecimal.valueOf(useLifeMonths).setScale(12).divide(TWELVE, RoundingMode.HALF_UP);
- /* commented out by @win
- int A_Asset_Class_ID = getA_Asset_Class_ID();
- if (A_Asset_Class_ID > 0 && (useLifeMonths == 0 || useLifeYears == 0)) {
- if(saveError) log.saveError("Error", "@Invalid@ @UseLifeMonths@=" + useLifeMonths + ", @UseLifeYears@=" + useLifeYears);
- return false;
- }
- */ //commented out by @win
setUseLifeMonths(useLifeMonths);
setUseLifeYears(useLifeYears);
- /* commented by @win
- MAssetClass assetClass = MAssetClass.get(getCtx(), A_Asset_Class_ID);
- if (assetClass != null && !assetClass.validate(this)) {
- if (log.isLoggable(Level.FINE)) log.fine("Leaving [RETURN FALSE]");
- return false;
- }
- */ //end comment by @win
-
if (log.isLoggable(Level.FINE)) log.fine("Leaving [RETURN TRUE]");
return true;
}
@@ -263,7 +270,6 @@ public class UseLifeImpl
"UseLifeImpl[UseLife=" + getUseLifeYears() + "|" + getUseLifeMonths()
+ ", isFiscal=" + isFiscal()
+ ", AssetServiceDate=" + getAssetServiceDate()
- //+ ", A_Asset_Class=" + getA_Asset_Class_ID() //commented by @win
+ ", m_obj=" + m_obj
+ "]"
;
@@ -279,42 +285,23 @@ public class UseLifeImpl
return null;
return TimeUtil.addMonths(assetServiceDate, A_Current_Period);
}
-
-
-
+
/**
* Callout Class
*/
public static class Callout extends org.compiere.model.CalloutEngine {
/** */
private String validate(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
- /* commented out by @win
- Integer A_Asset_Class_ID = (Integer)mTab.getValue("A_Asset_Class_ID");
- if (A_Asset_Class_ID == null || A_Asset_Class_ID == 0) {
- return NO_ERROR;
- }
- */ //end commented by @win
Timestamp AssetServiceDate = (Timestamp)mTab.getValue("AssetServiceDate");
if (AssetServiceDate == null) {
return NO_ERROR;
}
- /* commented out by @win
- MAssetClass assetClass = MAssetClass.get(ctx, A_Asset_Class_ID);
- if (assetClass == null) {
- return NO_ERROR;
- }
- */ // end comment by @win
Integer UseLifeMonths = (Integer)mTab.getValue("UseLifeMonths");
if (UseLifeMonths == null) {
UseLifeMonths = 0;
}
- /* commented out by @win
- String errmsg = assetClass.validate(false, UseLifeMonths, AssetServiceDate);
- if(CLogMgt.isLevelFine()) if (log.isLoggable(Level.FINE)) log.fine("assetClass=" + assetClass + ", UseLifeMonths=" + UseLifeMonths + ", AssetServiceDate=" + AssetServiceDate + ", errmsg=" + errmsg);
- return errmsg;
- */ // end comment by @win
- return NO_ERROR; //added by @win
+ return NO_ERROR;
}
/** */
@@ -380,42 +367,6 @@ public class UseLifeImpl
}
MAssetGroup.updateAsset(SetGetUtil.wrap(mTab), A_Asset_Group_ID);
return NO_ERROR;
- }
-
- /** */
- /* commented by @win
- public String assetClass(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
- if (isCalloutActive()) {
- return NO_ERROR;
- }
-
- String errmsg = NO_ERROR;
- int A_Asset_Class_ID = -1;
- String columnName = mField.getColumnName();
- if(CLogMgt.isLevelFine()) if (log.isLoggable(Level.FINE)) log.fine("Entering: columnName: " + columnName + ", value=" + value);
-
- if (value != null && value instanceof Number) {
- A_Asset_Class_ID = ((Number)value).intValue();
- }
- if(CLogMgt.isLevelFine()) if (log.isLoggable(Level.FINE)) log.fine("A_Asset_Class_ID=" + A_Asset_Class_ID);
-
- if (A_Asset_Class_ID > 0) {
- MAssetClass assetClass = MAssetClass.get(ctx, A_Asset_Class_ID);
- Integer UseLifeMonths = (Integer)mTab.getValue("UseLifeMonths_F");
- Timestamp AssetServiceDate = (Timestamp)mTab.getValue("AssetServiceDate");
- if (UseLifeMonths == null || UseLifeMonths == 0) {
- UseLifeMonths = assetClass.getA_Life_Period_Min(AssetServiceDate);
- mTab.setValue("UseLifeMonths", UseLifeMonths);
- }
- else {
- errmsg = assetClass.validate(false, UseLifeMonths, AssetServiceDate);
- }
- if(CLogMgt.isLevelFine()) if (log.isLoggable(Level.FINE)) log.fine("assetClass=" + assetClass + ", UseLifeMonths=" + UseLifeMonths + ", AssetServiceDate=" + AssetServiceDate + ", errmsg=" + errmsg);
- }
-
- if(CLogMgt.isLevelFine()) if (log.isLoggable(Level.FINE)) log.fine("Leaving: errmsg=" + errmsg);
- return errmsg;
- }
- */ // end commented by @win
+ }
} // class Callout
}
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/fa/feature/package-info.java b/org.adempiere.base/src/org/idempiere/fa/feature/package-info.java
new file mode 100644
index 0000000000..90e24a3937
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/fa/feature/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide classes for fixed asset useful life feature
+ */
+package org.idempiere.fa.feature;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Asset_Addition.java b/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Asset_Addition.java
index 0fb613dfcc..1315577dfe 100644
--- a/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Asset_Addition.java
+++ b/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Asset_Addition.java
@@ -1,3 +1,24 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.model;
import java.math.BigDecimal;
@@ -15,7 +36,6 @@ import org.compiere.model.SetGetUtil;
import org.compiere.util.Env;
import org.compiere.util.TimeUtil;
-
/**
* @author Teo Sarca, http://www.arhipac.ro
*/
@@ -83,25 +103,18 @@ public class CalloutA_Asset_Addition extends CalloutEngine
}
public String uselife(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
- {
-
+ {
return "";
}
-
-
+
public String periodOffset(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
{
I_A_Asset_Addition aa = GridTabWrapper.create(mTab, I_A_Asset_Addition.class);
-
-
int periods = TimeUtil.getMonthsBetween(aa.getDateDoc(), aa.getDateAcct());
if (periods <= 0)
{
return "";
}
-
-
-
return "";
}
diff --git a/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Asset_Disposed.java b/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Asset_Disposed.java
index 53ff8a47bd..4b6098ee5b 100644
--- a/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Asset_Disposed.java
+++ b/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Asset_Disposed.java
@@ -1,6 +1,24 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.model;
import java.math.BigDecimal;
@@ -15,10 +33,7 @@ import org.compiere.model.I_A_Asset_Disposed;
import org.compiere.model.MAssetDisposed;
import org.compiere.util.Env;
-
-
/**
- *
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
*/
public class CalloutA_Asset_Disposed extends CalloutEngine
diff --git a/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Asset_Reval.java b/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Asset_Reval.java
index 5e9b388172..2796dfc7f8 100644
--- a/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Asset_Reval.java
+++ b/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Asset_Reval.java
@@ -1,6 +1,24 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.model;
import java.util.Properties;
@@ -13,10 +31,8 @@ import org.compiere.model.I_A_Asset_Reval;
import org.compiere.model.MAssetReval;
import org.compiere.model.MDepreciationWorkfile;
-
/**
* @author Anca Bradau www.arhipac.ro
- *
*/
public class CalloutA_Asset_Reval extends CalloutEngine
{
@@ -43,14 +59,15 @@ public class CalloutA_Asset_Reval extends CalloutEngine
model.setA_Change_Acumulated_Depr(amount.getA_Accumulated_Depr());
return "";
- }
+ }
+
public String dateDoc(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
- {
- if (isCalloutActive() || value == null)
- return "";
-
- mTab.setValue(MAssetReval.COLUMNNAME_DateAcct, value);
- return "";
- }
+ {
+ if (isCalloutActive() || value == null)
+ return "";
+
+ mTab.setValue(MAssetReval.COLUMNNAME_DateAcct, value);
+ return "";
+ }
}
diff --git a/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Asset_Transfer.java b/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Asset_Transfer.java
index d96ed6a5d3..2fa9883731 100644
--- a/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Asset_Transfer.java
+++ b/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Asset_Transfer.java
@@ -1,6 +1,24 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.model;
import java.util.Properties;
@@ -13,11 +31,8 @@ import org.compiere.model.I_A_Asset_Transfer;
import org.compiere.model.MAssetAcct;
import org.compiere.model.MAssetTransfer;
-
-
/**
* @author Anca Bradau, www.arhipac.ro
- *
*/
public class CalloutA_Asset_Transfer extends CalloutEngine
{
@@ -60,6 +75,7 @@ public class CalloutA_Asset_Transfer extends CalloutEngine
return "";
}
+
public String dateDoc(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
{
if (isCalloutActive() || value == null)
diff --git a/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Depreciation_Workfile.java b/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Depreciation_Workfile.java
index 3cf50d3a04..85f59967a3 100644
--- a/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Depreciation_Workfile.java
+++ b/org.adempiere.base/src/org/idempiere/fa/model/CalloutA_Depreciation_Workfile.java
@@ -1,3 +1,24 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.model;
import java.math.BigDecimal;
@@ -10,7 +31,6 @@ import org.compiere.model.GridTab;
import org.compiere.model.MDepreciationWorkfile;
import org.compiere.model.SetGetUtil;
-
/**
* @author Teo Sarca, http://www.arhipac.ro
*/
diff --git a/org.adempiere.base/src/org/idempiere/fa/model/CalloutAsset.java b/org.adempiere.base/src/org/idempiere/fa/model/CalloutAsset.java
index 8d8819d027..5a629bec56 100644
--- a/org.adempiere.base/src/org/idempiere/fa/model/CalloutAsset.java
+++ b/org.adempiere.base/src/org/idempiere/fa/model/CalloutAsset.java
@@ -1,6 +1,24 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.model;
import java.sql.PreparedStatement;
@@ -17,8 +35,7 @@ import org.compiere.util.DB;
import org.compiere.util.Env;
/**
- * @category STUB for upgrading to 361
- *
+ * Callout for MAsset
*/
public class CalloutAsset extends CalloutEngine {
@@ -48,7 +65,6 @@ public class CalloutAsset extends CalloutEngine {
return "";
}
-
public String asset(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
{
if (value != null && MAsset.COLUMNNAME_A_Asset_ID.equals(mField.getColumnName()))
@@ -61,8 +77,7 @@ public class CalloutAsset extends CalloutEngine {
return "";
}
-
-
+
/**
* Table_Period. Used to set the Manual Period Field. This allows
* the Spread Field to be displayed when there is a code that
@@ -80,7 +95,7 @@ public class CalloutAsset extends CalloutEngine {
*/
public String Table_Period (Properties ctx, int WindowNo,
GridTab mTab, GridField mField, Object value, Object oldValue)
- {
+ {
Integer A_Depreciation_Table_Header_ID = (Integer)value;
PreparedStatement pstmt = null;
@@ -117,7 +132,7 @@ public class CalloutAsset extends CalloutEngine {
pstmt = null;
}
return "";
- } // Period Type
+ } // Period Type
/**
* Field_Clear. Used to set the Manual Period Field. This allows
@@ -136,7 +151,7 @@ public class CalloutAsset extends CalloutEngine {
*/
public String Field_Clear (Properties ctx, int WindowNo,
GridTab mTab, GridField mField, Object value, Object oldValue)
- {
+ {
Object A_Depreciation_ID = value;
PreparedStatement pstmt = null;
@@ -183,28 +198,6 @@ public class CalloutAsset extends CalloutEngine {
pstmt = null;
}
return "";
- } // Period Type
+ } // Period Type
- /** ARHIPAC: TEO: BEGIN ------------------------------------------------------------------------------------------------------------------------------ */
- /* commented by @win - no necessary code
- public String invoiceLineProduct(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
- if (isCalloutActive()) {
- return "";
- }
- ro.arhipac.adempiere.fa.ModelValidator.modelChange_InvoiceLine(
- SetGetUtil.wrap(mTab),
- -1);
- return "";
- }
-
- public String inventoryLineProduct(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
- if (isCalloutActive()) {
- return "";
- }
- ro.arhipac.adempiere.fa.ModelValidator.modelChange_InventoryLine(
- SetGetUtil.wrap(mTab),
- -1);
- return "";
- }
- */
}
diff --git a/org.adempiere.base/src/org/idempiere/fa/model/ModelValidator.java b/org.adempiere.base/src/org/idempiere/fa/model/ModelValidator.java
index 3f736c0ab5..fb4e926509 100644
--- a/org.adempiere.base/src/org/idempiere/fa/model/ModelValidator.java
+++ b/org.adempiere.base/src/org/idempiere/fa/model/ModelValidator.java
@@ -1,6 +1,24 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.model;
import java.util.List;
@@ -24,12 +42,9 @@ import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.idempiere.fa.exceptions.AssetProductStockedException;
-
-
/**
* Fixed Assets Model Validator
* @author Teo_Sarca, SC ARHIPAC SERVICE SRL
- *
*/
public class ModelValidator
implements org.compiere.model.ModelValidator, org.compiere.model.FactsValidator
@@ -39,12 +54,12 @@ implements org.compiere.model.ModelValidator, org.compiere.model.FactsValidator
/** Client */
private int m_AD_Client_ID = -1;
-
+ @Override
public int getAD_Client_ID() {
return m_AD_Client_ID;
}
-
+ @Override
public void initialize(ModelValidationEngine engine, MClient client)
{
if (client != null)
@@ -58,11 +73,13 @@ implements org.compiere.model.ModelValidator, org.compiere.model.FactsValidator
//
}
+ @Override
public String login(int AD_Org_ID, int AD_Role_ID, int AD_User_ID)
{
return null;
}
+ @Override
public String modelChange(PO po, int type) throws Exception
{
if (po instanceof MMatchInv
@@ -75,9 +92,6 @@ implements org.compiere.model.ModelValidator, org.compiere.model.FactsValidator
MInvoiceLine invoiceLine = new MInvoiceLine(mi.getCtx(), mi.getC_InvoiceLine_ID(), mi.get_TrxName());
if (invoiceLine.isA_CreateAsset()
&& !invoiceLine.isA_Processed()
- /* commented by @win
- && MAssetType.isFixedAssetGroup(mi.getCtx(), invoiceLine.getA_Asset_Group_ID())
- */
)
{
MAssetAddition.createAsset(mi);
@@ -94,9 +108,9 @@ implements org.compiere.model.ModelValidator, org.compiere.model.FactsValidator
}
+ @Override
public String docValidate(PO po, int timing)
- {
-
+ {
if (log.isLoggable(Level.INFO)) log.info(po.get_TableName() + " Timing: " + timing);
String result = null;
@@ -134,24 +148,7 @@ implements org.compiere.model.ModelValidator, org.compiere.model.FactsValidator
@SuppressWarnings("unused")
boolean isSOTrx = DB.isSOTrx(MInvoice.Table_Name, MInvoice.COLUMNNAME_C_Invoice_ID+"="+invoice_id);
boolean isAsset = false;
- /* comment by @win
- boolean isFixedAsset = false;
- */
int assetGroup_ID = 0;
- //@win commenting this out to enable relating AR Invoice to Asset Disposal
- /*
- if (!isSOTrx) {
- int product_id = SetGetUtil.get_AttrValueAsInt(m, MInvoiceLine.COLUMNNAME_M_Product_ID);
- if (product_id > 0) {
- MProduct prod = MProduct.get(m.getCtx(), product_id);
- isAsset = (prod != null && prod.get_ID() > 0 && prod.isCreateAsset());
- assetGroup_ID = prod.getA_Asset_Group_ID();
-
- //isFixedAsset = MAssetType.isFixedAssetGroup(m.getCtx(), assetGroup_ID); //commented by @win - remove asset type
-
- }
- }
- */
int product_id = SetGetUtil.get_AttrValueAsInt(m, MInvoiceLine.COLUMNNAME_M_Product_ID);
if (product_id > 0) {
MProduct prod = MProduct.get(m.getCtx(), product_id);
@@ -159,14 +156,9 @@ implements org.compiere.model.ModelValidator, org.compiere.model.FactsValidator
assetGroup_ID = prod!=null ? prod.getA_Asset_Group_ID() : 0;
}
- // end modification by @win
-
m.set_AttrValue(MInvoiceLine.COLUMNNAME_A_CreateAsset, isAsset);
if (isAsset) {
m.set_AttrValue(MInvoiceLine.COLUMNNAME_A_Asset_Group_ID, assetGroup_ID);
- /* comment by @win
- m.set_AttrValue(MInvoiceLine.COLUMNNAME_IsFixedAssetInvoice, isFixedAsset);
- */
m.set_AttrValue("IsFixedAssetInvoice", isAsset);
m.set_AttrValue(MInvoiceLine.COLUMNNAME_A_CreateAsset, "Y");
@@ -215,6 +207,7 @@ implements org.compiere.model.ModelValidator, org.compiere.model.FactsValidator
}
}
+ @Override
public String factsValidate(MAcctSchema schema, List facts, PO po) {
return null;
}
diff --git a/org.adempiere.base/src/org/idempiere/fa/model/package-info.java b/org.adempiere.base/src/org/idempiere/fa/model/package-info.java
new file mode 100644
index 0000000000..b6395aa7bf
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/fa/model/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide callout and model validator classes for fixed asset
+ */
+package org.idempiere.fa.model;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/fa/process/A_Asset_Addition_ProcessAll.java b/org.adempiere.base/src/org/idempiere/fa/process/A_Asset_Addition_ProcessAll.java
index b4a890d400..6c316f0a43 100644
--- a/org.adempiere.base/src/org/idempiere/fa/process/A_Asset_Addition_ProcessAll.java
+++ b/org.adempiere.base/src/org/idempiere/fa/process/A_Asset_Addition_ProcessAll.java
@@ -1,3 +1,24 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.process;
import org.compiere.model.MAssetAddition;
@@ -6,7 +27,6 @@ import org.compiere.model.Query;
import org.compiere.process.SvrProcess;
import org.compiere.util.DB;
-
/**
* Process All (not processed) Additions
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
@@ -14,10 +34,11 @@ import org.compiere.util.DB;
@org.adempiere.base.annotation.Process
public class A_Asset_Addition_ProcessAll extends SvrProcess
{
-
+ @Override
protected void prepare() {
}
+ @Override
protected String doIt() throws Exception {
int cnt_ok = 0, cnt_err = 0;
//
diff --git a/org.adempiere.base/src/org/idempiere/fa/process/A_Asset_CreateFromMatchInv.java b/org.adempiere.base/src/org/idempiere/fa/process/A_Asset_CreateFromMatchInv.java
index 6b3ebc0d19..8aed563372 100644
--- a/org.adempiere.base/src/org/idempiere/fa/process/A_Asset_CreateFromMatchInv.java
+++ b/org.adempiere.base/src/org/idempiere/fa/process/A_Asset_CreateFromMatchInv.java
@@ -1,3 +1,24 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.process;
import org.compiere.model.MAssetAddition;
@@ -7,10 +28,8 @@ import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.idempiere.fa.exceptions.AssetException;
-
-
/**
- * Create asset from match invoice process
+ * Process to create asset from match invoice
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
*/
@org.adempiere.base.annotation.Process
@@ -20,6 +39,7 @@ public class A_Asset_CreateFromMatchInv extends SvrProcess {
/**
* Prepare - e.g., get Parameters.
*/
+ @Override
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
@@ -35,6 +55,7 @@ public class A_Asset_CreateFromMatchInv extends SvrProcess {
}
} // prepare
+ @Override
protected String doIt() throws Exception
{
MMatchInv match = new MMatchInv(getCtx(), p_M_MatchInv_ID, get_TrxName());
diff --git a/org.adempiere.base/src/org/idempiere/fa/process/A_Depreciation_Exp_Check.java b/org.adempiere.base/src/org/idempiere/fa/process/A_Depreciation_Exp_Check.java
index 90cd847e6d..837a5f4b58 100644
--- a/org.adempiere.base/src/org/idempiere/fa/process/A_Depreciation_Exp_Check.java
+++ b/org.adempiere.base/src/org/idempiere/fa/process/A_Depreciation_Exp_Check.java
@@ -1,6 +1,24 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.process;
import java.sql.Timestamp;
@@ -19,10 +37,8 @@ import org.compiere.process.SvrProcess;
import org.compiere.util.DB;
import org.compiere.util.TimeUtil;
-
/**
* @author Anca Bradau www.arhipac.ro
- *
*/
@org.adempiere.base.annotation.Process
public class A_Depreciation_Exp_Check extends SvrProcess
@@ -31,10 +47,9 @@ public class A_Depreciation_Exp_Check extends SvrProcess
private int p_A_Asset_ID = -1;
private String p_WhereClause = null;
-
+ @Override
protected void prepare()
{
- ;
for (ProcessInfoParameter para : getParameter())
{
String name = para.getParameterName();
@@ -59,11 +74,9 @@ public class A_Depreciation_Exp_Check extends SvrProcess
}
}
-
+ @Override
protected String doIt() throws Exception
{
-// ARHIPAC.assertDebugging();
-
for (int A_Asset_ID : getAsset_IDs())
{
fixDepreciation(A_Asset_ID);
@@ -76,6 +89,10 @@ public class A_Depreciation_Exp_Check extends SvrProcess
return "Ok";
}
+ /**
+ * Get ids of fixed asset
+ * @return fixed asset ids
+ */
private int[] getAsset_IDs()
{
ArrayList params = new ArrayList();
diff --git a/org.adempiere.base/src/org/idempiere/fa/process/A_Depreciation_Exp_Modify.java b/org.adempiere.base/src/org/idempiere/fa/process/A_Depreciation_Exp_Modify.java
index 7b0d219396..ca98c2a2d9 100644
--- a/org.adempiere.base/src/org/idempiere/fa/process/A_Depreciation_Exp_Modify.java
+++ b/org.adempiere.base/src/org/idempiere/fa/process/A_Depreciation_Exp_Modify.java
@@ -1,6 +1,24 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.process;
import org.adempiere.exceptions.AdempiereException;
@@ -11,7 +29,6 @@ import org.compiere.model.MProcessPara;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
-
/**
* WARNING: INTERNAL PROCESS
* @author Anca Bradau www.arhipac.ro
@@ -25,8 +42,7 @@ public class A_Depreciation_Exp_Modify extends SvrProcess
private int p_CR_Account_ID = -1;
private boolean p_IsTest = true;
-
-
+ @Override
protected void prepare()
{
;
@@ -58,10 +74,9 @@ public class A_Depreciation_Exp_Modify extends SvrProcess
}
-
+ @Override
protected String doIt() throws Exception
{
-// ARHIPAC.assertDebugging();
//
if (p_A_Depreciation_Exp_ID <= 0)
{
diff --git a/org.adempiere.base/src/org/idempiere/fa/process/A_Depreciation_Exp_Process.java b/org.adempiere.base/src/org/idempiere/fa/process/A_Depreciation_Exp_Process.java
index e065b0c758..861f3327a5 100644
--- a/org.adempiere.base/src/org/idempiere/fa/process/A_Depreciation_Exp_Process.java
+++ b/org.adempiere.base/src/org/idempiere/fa/process/A_Depreciation_Exp_Process.java
@@ -6,17 +6,19 @@ package org.idempiere.fa.process;
import org.compiere.model.MDepreciationExp;
import org.compiere.process.SvrProcess;
-
/**
+ * Process to process depreciation expenses ({@link MDepreciationExp})
* @author Teo_Sarca, SC ARHIPAC SERVICE SRL
*/
@org.adempiere.base.annotation.Process
public class A_Depreciation_Exp_Process extends SvrProcess {
+ @Override
protected void prepare()
{
}
+ @Override
protected String doIt() throws Exception
{
MDepreciationExp depexp = new MDepreciationExp(getCtx(), getRecord_ID(), get_TrxName());
diff --git a/org.adempiere.base/src/org/idempiere/fa/process/A_Depreciation_Workfile_Build.java b/org.adempiere.base/src/org/idempiere/fa/process/A_Depreciation_Workfile_Build.java
index 987f0e9ed2..6f8473abaf 100644
--- a/org.adempiere.base/src/org/idempiere/fa/process/A_Depreciation_Workfile_Build.java
+++ b/org.adempiere.base/src/org/idempiere/fa/process/A_Depreciation_Workfile_Build.java
@@ -1,6 +1,24 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.process;
import org.compiere.model.MDepreciationWorkfile;
@@ -11,9 +29,8 @@ import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.DB;
-
/**
- * Create Depreciation
+ * Process to Create Depreciation from depreciation work file ({@link MDepreciationWorkfile})
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
*/
@org.adempiere.base.annotation.Process
@@ -21,6 +38,7 @@ public class A_Depreciation_Workfile_Build extends SvrProcess
{
private int A_Depreciation_Workfile_ID = 0;
+ @Override
protected void prepare() {
A_Depreciation_Workfile_ID = getRecord_ID();
ProcessInfoParameter[] para = getParameter();
@@ -39,6 +57,7 @@ public class A_Depreciation_Workfile_Build extends SvrProcess
}
}
+ @Override
protected String doIt() throws Exception {
int cnt_all = 0;
if (A_Depreciation_Workfile_ID > 0) {
diff --git a/org.adempiere.base/src/org/idempiere/fa/process/ImportFixedAsset.java b/org.adempiere.base/src/org/idempiere/fa/process/ImportFixedAsset.java
index 491e95c30b..e65609a177 100644
--- a/org.adempiere.base/src/org/idempiere/fa/process/ImportFixedAsset.java
+++ b/org.adempiere.base/src/org/idempiere/fa/process/ImportFixedAsset.java
@@ -1,3 +1,24 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.process;
import java.math.BigDecimal;
@@ -19,9 +40,8 @@ import org.compiere.process.SvrProcess;
import org.compiere.util.DB;
import org.compiere.util.Env;
-
/**
- * Import Fixed Asset
+ * Process to Import Fixed Asset from I_FixedAsset
*
* @author Zuhri Utama, Ambidexter [based on ImportAssetClass Teo Sarca]
*
@@ -47,6 +67,7 @@ public class ImportFixedAsset extends SvrProcess
/**
* Prepare - e.g., get Parameters.
*/
+ @Override
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
@@ -73,10 +94,11 @@ public class ImportFixedAsset extends SvrProcess
/**
- * Perrform process.
+ * Perform process.
* @return Message
* @throws Exception
*/
+ @Override
protected String doIt() throws java.lang.Exception
{
StringBuilder sql = null;
@@ -276,137 +298,6 @@ public class ImportFixedAsset extends SvrProcess
if (no != 0)
log.warning ("No AssetDepreciationDate=" + no);
-// // Set DateAcct (mandatory)
-// sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa ")
-// .append("SET DateAcct=SysDate ")
-// .append("WHERE DateAcct IS NULL")
-// .append(" AND I_IsImported<>'Y'").append (sqlCheck);
-// no = DB.executeUpdate(sql.toString(), get_TrxName());
-// if (log.isLoggable(Level.FINE)) log.fine("Set DateAcct=" + no);
-
- //-- New BPartner ---------------------------------------------------
-
- // Go through Fixed Assets Records w/o C_BPartner_ID
- /* no need this @win
- sql = new StringBuilder ("SELECT * FROM "+MIFixedAsset.Table_Name+ "
- + "WHERE I_IsImported='N' AND C_BPartnerSR_ID IS NULL").append (sqlCheck);
- try
- {
- PreparedStatement pstmt = DB.prepareStatement (sql.toString(), get_TrxName());
- ResultSet rs = pstmt.executeQuery ();
- while (rs.next ())
- {
- MIFixedAsset ifa = new MIFixedAsset (getCtx(), rs, get_TrxName());
- if (ifa.getBPartner_Value () == null)
- continue;
-
- // BPartner
- MBPartner bp = MBPartner.get (getCtx(), ifa.getBPartner_Value());
- if (bp == null)
- {
- bp = new MBPartner (getCtx (), -1, get_TrxName());
- bp.setClientOrg (ifa.getAD_Client_ID (), ifa.getAD_Org_ID ());
- bp.setValue (ifa.getBPartner_Value ());
- bp.setName (ifa.getBPartner_Value ());
- if (!bp.save ())
- continue;
- }
- ifa.setC_BPartnerSR_ID (bp.getC_BPartner_ID ());
-
- MBPartnerLocation bpl = null;
-
- if (bpl == null)
- {
- // New Location
- MLocation loc = new MLocation (getCtx (), 0, get_TrxName());
- loc.setCity (ifa.getC_City_Value ());
- if (!loc.save ())
- continue;
- //
- bpl = new MBPartnerLocation (bp);
- bpl.setC_Location_ID (loc.getC_Location_ID());
- if (!bpl.save ())
- continue;
- }
- ifa.saveEx();
- } // for all new BPartners
- rs.close ();
- pstmt.close ();
- //
- }
- catch (SQLException e)
- {
- log.log(Level.SEVERE, "CreateBP", e);
- }
- sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+ " "
- + "SET I_IsImported='N', I_ErrorMsg=I_ErrorMsg||'ERR=No BPartner, ' "
- + "WHERE C_BPartnerSR_ID IS NULL"
- + " AND I_IsImported<>'Y'").append (sqlCheck);
- no = DB.executeUpdate(sql.toString(), get_TrxName());
- if (no != 0)
- log.warning ("No BPartner=" + no);
-
- commitEx();
-
- //-- New Product ---------------------------------------------------
- // TODO : zuhri Utama - need to fixed create new product
-
- // Go through Fixed Assets Records w/o M_Product_ID
- sql = new StringBuilder ("SELECT * FROM "+MIFixedAsset.Table_Name+ " "
- + "WHERE I_IsImported='N' AND M_Product_ID IS NULL").append (sqlCheck);
- try
- {
- PreparedStatement pstmt = DB.prepareStatement (sql.toString(), get_TrxName());
- ResultSet rs = pstmt.executeQuery ();
- while (rs.next ())
- {
- MIFixedAsset ifa = new MIFixedAsset (getCtx(), rs, get_TrxName());
- if (ifa.getProductValue () == null)
- continue;
-
- // Product
- String Value = ifa.getProductValue ();
- if (Value == null || Value.length() == 0)
- return null;
- final String whereClause = "Value=? AND AD_Client_ID=?";
- MProduct product = new Query(getCtx(), MProduct.Table_Name, whereClause, null)
- .setParameters(Value,Env.getAD_Client_ID(getCtx()))
- .firstOnly();
- if (product == null)
- {
- product = new MProduct (getCtx (), -1, get_TrxName());
- product.setAD_Org_ID(ifa.getAD_Org_ID ());
- product.setValue (ifa.getProductValue ());
- product.setName (ifa.getProductValue ());
- product.setC_UOM_ID(ifa.getC_UOM_ID());
- if(p_M_Product_Category_ID>0)
- product.setM_Product_Category_ID(p_M_Product_Category_ID);
- if (!product.save ())
- continue;
- }
- ifa.setM_Product_ID (product.getM_Product_ID());
-
- ifa.saveEx();
- } // for all new Products
- rs.close ();
- pstmt.close ();
- //
- }
- catch (SQLException e)
- {
- log.log(Level.SEVERE, "CreateProduct", e);
- }
- sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+ " "
- + "SET I_IsImported='N', I_ErrorMsg=I_ErrorMsg||'ERR=No BPartner, ' "
- + "WHERE M_Product_ID IS NULL"
- + " AND I_IsImported<>'Y'").append (sqlCheck);
- no = DB.executeUpdate(sql.toString(), get_TrxName());
- if (no != 0)
- log.warning ("No Product=" + no);
-
- commitEx();
- */ //commented by @win
-
if (p_IsValidateOnly)
return "Data Was Validated";
diff --git a/org.adempiere.base/src/org/idempiere/fa/process/ProjectCreateAsset.java b/org.adempiere.base/src/org/idempiere/fa/process/ProjectCreateAsset.java
index bc89ef8af0..12673d50ed 100644
--- a/org.adempiere.base/src/org/idempiere/fa/process/ProjectCreateAsset.java
+++ b/org.adempiere.base/src/org/idempiere/fa/process/ProjectCreateAsset.java
@@ -16,7 +16,6 @@
*****************************************************************************/
package org.idempiere.fa.process;
-
import java.sql.Timestamp;
import java.util.logging.Level;
@@ -29,11 +28,9 @@ import org.compiere.process.DocAction;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.Msg;
-
/**
- * Open Project.
- * Opening project will automatically create asset and asset addition
+ * Process to create project asset
*
* @author zuhri utama
*/
@@ -52,6 +49,7 @@ public class ProjectCreateAsset extends SvrProcess
/**
* Prepare - e.g., get Parameters.
*/
+ @Override
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
@@ -83,6 +81,7 @@ public class ProjectCreateAsset extends SvrProcess
* @return Message (translated text)
* @throws Exception if not successful
*/
+ @Override
protected String doIt() throws Exception
{
if (m_C_Project_ID == 0 || m_Product_ID == 0) {
diff --git a/org.adempiere.base/src/org/idempiere/fa/process/SvrProcess2.java b/org.adempiere.base/src/org/idempiere/fa/process/SvrProcess2.java
index 70f3d51edb..69d060669e 100644
--- a/org.adempiere.base/src/org/idempiere/fa/process/SvrProcess2.java
+++ b/org.adempiere.base/src/org/idempiere/fa/process/SvrProcess2.java
@@ -1,6 +1,24 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.process;
import java.lang.reflect.Field;
@@ -12,23 +30,27 @@ import org.compiere.process.SvrProcess;
import org.compiere.util.CLogger;
/**
- * Server Process Template (v2).
+ * Server Process Template (v2).
* In this version, parameters fields will be automatically filled if they start with p_ and are accessible.
*
* @author Teo Sarca, www.arhipac.ro
- *
*/
public abstract class SvrProcess2 extends SvrProcess
{
/** Logger */
private static final CLogger s_log = CLogger.getCLogger(SvrProcess2.class);
-
+ @Override
protected final void prepare()
{
readParameters(this, getParameter());
}
+ /**
+ * Fill process parameter field using reflection API.
+ * @param process
+ * @param params
+ */
private static void readParameters(SvrProcess process, ProcessInfoParameter[] params)
{
try
diff --git a/org.adempiere.base/src/org/idempiere/fa/process/package-info.java b/org.adempiere.base/src/org/idempiere/fa/process/package-info.java
new file mode 100644
index 0000000000..3333e88913
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/fa/process/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide class for fixed asset process
+ */
+package org.idempiere.fa.process;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/fa/service/api/DepreciationDTO.java b/org.adempiere.base/src/org/idempiere/fa/service/api/DepreciationDTO.java
index 711cccf9e4..d29352b9b9 100644
--- a/org.adempiere.base/src/org/idempiere/fa/service/api/DepreciationDTO.java
+++ b/org.adempiere.base/src/org/idempiere/fa/service/api/DepreciationDTO.java
@@ -1,3 +1,24 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.service.api;
import java.io.Serializable;
@@ -6,21 +27,22 @@ import java.sql.Timestamp;
import java.util.Calendar;
/**
- * parameter to calculate depreciation
+ * Parameter to calculate depreciation
* @author hieplq
*
*/
public class DepreciationDTO implements Serializable {
/**
- *
+ * generated serial id
*/
private static final long serialVersionUID = -748366297153525253L;
+
/**
- * period calculate for
+ * Period to calculate for
*/
public int period;
/**
- * remain amount after full depreciation
+ * Salvage amount after full depreciation
*/
public BigDecimal salvage;
/**
@@ -60,8 +82,6 @@ public class DepreciationDTO implements Serializable {
public BigDecimal totalAmount;
public int scale = 4;
-/*** idempiere part ****/
-
/**
* in case DTO isn't enough or not suitable for your method, use depreciationId to get X_A_Depreciation_Workfile so you can get more relate info
*/
diff --git a/org.adempiere.base/src/org/idempiere/fa/service/api/DepreciationFactoryLookupDTO.java b/org.adempiere.base/src/org/idempiere/fa/service/api/DepreciationFactoryLookupDTO.java
index 10ed775442..b6b3375adb 100644
--- a/org.adempiere.base/src/org/idempiere/fa/service/api/DepreciationFactoryLookupDTO.java
+++ b/org.adempiere.base/src/org/idempiere/fa/service/api/DepreciationFactoryLookupDTO.java
@@ -1,10 +1,31 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.service.api;
/**
- * pass to {@link IDepreciationMethodFactory} to lookup {@link IDepreciationMethod} implement
+ * Pass to {@link IDepreciationMethodFactory} to lookup {@link IDepreciationMethod} implementation
* @author hieplq
- *
*/
public class DepreciationFactoryLookupDTO {
+ /** Depreciation Type */
public String depreciationType;
}
diff --git a/org.adempiere.base/src/org/idempiere/fa/service/api/IDepreciationMethod.java b/org.adempiere.base/src/org/idempiere/fa/service/api/IDepreciationMethod.java
index 02e610c4d3..bb4a927161 100644
--- a/org.adempiere.base/src/org/idempiere/fa/service/api/IDepreciationMethod.java
+++ b/org.adempiere.base/src/org/idempiere/fa/service/api/IDepreciationMethod.java
@@ -1,28 +1,51 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.service.api;
import java.math.BigDecimal;
/**
- * implement this interface to provide depreciate calculate method
+ * Implement this interface to provide depreciation calculation method
* @author hieplq
*
*/
public interface IDepreciationMethod {
/**
- * calculate depreciation for each period
+ * Calculate depreciation for each period
* @param depreciationDTO
* @return amount depreciation for {@link DepreciationDTO#period}
*/
public BigDecimal caclulateDepreciation (DepreciationDTO depreciationDTO);
+
/**
- * get num of period to depreciation
+ * Get number of period to depreciate
* @param depreciationDTO
- * @return
+ * @return number of period to depreciate
*/
public long getCountPeriod (DepreciationDTO depreciationDTO);
+
/**
- * support to move all difference by round to end period
- * @return
- */
+ * Support to move all rounding differences to end period
+ * @return true to adjust for all rounding difference in end period
+ */
public boolean isPeriodAdjustment ();
}
diff --git a/org.adempiere.base/src/org/idempiere/fa/service/api/IDepreciationMethodFactory.java b/org.adempiere.base/src/org/idempiere/fa/service/api/IDepreciationMethodFactory.java
index 729ffa0687..6ecf1f93ae 100644
--- a/org.adempiere.base/src/org/idempiere/fa/service/api/IDepreciationMethodFactory.java
+++ b/org.adempiere.base/src/org/idempiere/fa/service/api/IDepreciationMethodFactory.java
@@ -1,7 +1,28 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.service.api;
/**
- * factory for {@link IDepreciationMethod}
+ * Factory for {@link IDepreciationMethod}
* @author hieplq
*
*/
@@ -9,7 +30,7 @@ public interface IDepreciationMethodFactory {
/**
* lookup {@link IDepreciationMethod}
* @param factoryLookupDTO
- * @return
+ * @return IDepreciationMethod implementation
*/
public IDepreciationMethod getDepreciationMethod(DepreciationFactoryLookupDTO factoryLookupDTO);
}
diff --git a/org.adempiere.base/src/org/idempiere/fa/service/api/package-info.java b/org.adempiere.base/src/org/idempiere/fa/service/api/package-info.java
new file mode 100644
index 0000000000..1e7495435f
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/fa/service/api/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide interface and classes for depreciation method service API.
+ */
+package org.idempiere.fa.service.api;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/fa/util/Util.java b/org.adempiere.base/src/org/idempiere/fa/util/Util.java
index 10d011d790..058d326912 100644
--- a/org.adempiere.base/src/org/idempiere/fa/util/Util.java
+++ b/org.adempiere.base/src/org/idempiere/fa/util/Util.java
@@ -1,6 +1,24 @@
-/**
- *
- */
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
package org.idempiere.fa.util;
import java.text.SimpleDateFormat;
@@ -11,7 +29,7 @@ import org.compiere.util.DisplayType;
import org.compiere.util.Language;
/**
- * Misc utils
+ * Provide static utility methods
* @author Teo Sarca, www.arhipac.ro
*
*/
@@ -23,6 +41,7 @@ public final class Util
}
/**
+ * Get date format for client
* @param ctx
* @return DateFormat for current AD_Client's language
*/
@@ -33,7 +52,7 @@ public final class Util
}
/**
- * Check if strings are equal.
+ * Check if strings are equal.
* We consider 2 strings equal if they both are null or they both are equal.
* @param s1
* @param s2
diff --git a/org.adempiere.base/src/org/idempiere/fa/util/package-info.java b/org.adempiere.base/src/org/idempiere/fa/util/package-info.java
new file mode 100644
index 0000000000..f31a4af788
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/fa/util/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide utility classes
+ */
+package org.idempiere.fa.util;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/mfa/EMailMechanism.java b/org.adempiere.base/src/org/idempiere/mfa/EMailMechanism.java
index 46e8a64640..f8a830f50e 100644
--- a/org.adempiere.base/src/org/idempiere/mfa/EMailMechanism.java
+++ b/org.adempiere.base/src/org/idempiere/mfa/EMailMechanism.java
@@ -41,6 +41,9 @@ import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Util;
+/**
+ * Email based Multi-factor authentication implementation.
+ */
public class EMailMechanism implements IMFAMechanism {
/**
@@ -51,7 +54,7 @@ public class EMailMechanism implements IMFAMechanism {
* @param method
* @param prm email
* @param trxName
- * @return Object[] - first object is the String with the instructions to follow
+ * @return Object[] - first object is the String with the instructions to follow,
* second object is the registration generated
*/
@Override
diff --git a/org.adempiere.base/src/org/idempiere/mfa/TOTPMechanism.java b/org.adempiere.base/src/org/idempiere/mfa/TOTPMechanism.java
index d3569f17da..bb3950061c 100644
--- a/org.adempiere.base/src/org/idempiere/mfa/TOTPMechanism.java
+++ b/org.adempiere.base/src/org/idempiere/mfa/TOTPMechanism.java
@@ -54,6 +54,9 @@ import dev.samstevens.totp.time.NtpTimeProvider;
import dev.samstevens.totp.time.SystemTimeProvider;
import dev.samstevens.totp.time.TimeProvider;
+/**
+ * Time-based one-time password (TOTP) based multi-factor authentication implementation
+ */
public class TOTPMechanism implements IMFAMechanism {
/**
@@ -63,12 +66,12 @@ public class TOTPMechanism implements IMFAMechanism {
* @param method
* @param prm optional - assigned name from the user
* @param trxName
- * @return Object[] - first object is the String with the instructions to follow
- * second object is the registration generated
- * third message qrcode
- * fourth qrcode
- * fifth message secret
- * sixth secret
+ * @return Object[] - first object is the String with the instructions to follow
+ * second object is the registration generated
+ * third message qrcode
+ * fourth qrcode
+ * fifth message secret
+ * sixth secret
*/
@Override
public Object[] register(Properties ctx, MMFAMethod method, String prm, String trxName) {
diff --git a/org.adempiere.base/src/org/idempiere/mfa/package-info.java b/org.adempiere.base/src/org/idempiere/mfa/package-info.java
new file mode 100644
index 0000000000..96dd8dc4ed
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/mfa/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide classes for multi-factor authentication implementation
+ */
+package org.idempiere.mfa;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/model/IProcessParameter.java b/org.adempiere.base/src/org/idempiere/model/IProcessParameter.java
index f4b8a81df7..8ab960d2a1 100644
--- a/org.adempiere.base/src/org/idempiere/model/IProcessParameter.java
+++ b/org.adempiere.base/src/org/idempiere/model/IProcessParameter.java
@@ -27,9 +27,8 @@ package org.idempiere.model;
import java.sql.Timestamp;
/**
- *
+ * Process parameter interface
* @author Peter Takacs, Cloudempiere
- *
*/
public interface IProcessParameter {
diff --git a/org.adempiere.base/src/org/idempiere/model/package-info.java b/org.adempiere.base/src/org/idempiere/model/package-info.java
new file mode 100644
index 0000000000..239e512276
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/model/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide callout, mapped model factory and process parameter interface
+ */
+package org.idempiere.model;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/print/IPrintHeaderFooter.java b/org.adempiere.base/src/org/idempiere/print/IPrintHeaderFooter.java
index 1e54d342ff..2eda2ba793 100644
--- a/org.adempiere.base/src/org/idempiere/print/IPrintHeaderFooter.java
+++ b/org.adempiere.base/src/org/idempiere/print/IPrintHeaderFooter.java
@@ -32,7 +32,7 @@ import org.compiere.print.layout.HeaderFooter;
*/
public interface IPrintHeaderFooter {
/***
- *
+ * Create report header and footer
* @param m_format
* @param m_headerFooter
* @param m_header
@@ -42,13 +42,13 @@ public interface IPrintHeaderFooter {
public void createHeaderFooter(MPrintFormat m_format, HeaderFooter m_headerFooter, Rectangle m_header, Rectangle m_footer, MQuery m_query);
/**
- *
+ * Get header height
* @return header height
*/
public int getHeaderHeight();
/**
- *
+ * Get footer height
* @return footer height
*/
public int getFooterHeight();
diff --git a/org.adempiere.base/src/org/idempiere/print/StandardHeaderFooter.java b/org.adempiere.base/src/org/idempiere/print/StandardHeaderFooter.java
index aa05ba8fe1..6dc21fccec 100644
--- a/org.adempiere.base/src/org/idempiere/print/StandardHeaderFooter.java
+++ b/org.adempiere.base/src/org/idempiere/print/StandardHeaderFooter.java
@@ -39,13 +39,12 @@ import org.compiere.util.Env;
import org.compiere.util.Util;
/**
- *
+ * Default report header and footer implementation
* @author hengsin
- *
*/
public class StandardHeaderFooter implements IPrintHeaderFooter {
- /**************************************************************************
+ /**
* Create Standard Header/Footer
*
{@code
* title C Page x of x
diff --git a/org.adempiere.base/src/org/idempiere/print/package-info.java b/org.adempiere.base/src/org/idempiere/print/package-info.java
new file mode 100644
index 0000000000..cde33144a1
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/print/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide interface and classes for custom report header and footer
+ */
+package org.idempiere.print;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/process/DeleteTraceLogs.java b/org.adempiere.base/src/org/idempiere/process/DeleteTraceLogs.java
index f649f72238..0ff5e8a750 100644
--- a/org.adempiere.base/src/org/idempiere/process/DeleteTraceLogs.java
+++ b/org.adempiere.base/src/org/idempiere/process/DeleteTraceLogs.java
@@ -35,6 +35,9 @@ import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.CLogFile;
+/**
+ * Process to delete old server log
+ */
@org.adempiere.base.annotation.Process
public class DeleteTraceLogs extends SvrProcess {
diff --git a/org.adempiere.base/src/org/idempiere/process/IMappedProcessFactory.java b/org.adempiere.base/src/org/idempiere/process/IMappedProcessFactory.java
index 4977e01164..852a42045a 100644
--- a/org.adempiere.base/src/org/idempiere/process/IMappedProcessFactory.java
+++ b/org.adempiere.base/src/org/idempiere/process/IMappedProcessFactory.java
@@ -29,9 +29,8 @@ import org.compiere.process.ProcessCall;
import org.osgi.framework.BundleContext;
/**
- *
+ * Mapped process factory interface
* @author hengsin
- *
*/
public interface IMappedProcessFactory extends IMappedByNameFactory {
diff --git a/org.adempiere.base/src/org/idempiere/process/MappedProcessFactory.java b/org.adempiere.base/src/org/idempiere/process/MappedProcessFactory.java
index 2d7239cb1e..9b57e70e59 100644
--- a/org.adempiere.base/src/org/idempiere/process/MappedProcessFactory.java
+++ b/org.adempiere.base/src/org/idempiere/process/MappedProcessFactory.java
@@ -44,8 +44,8 @@ import io.github.classgraph.ClassInfo;
import io.github.classgraph.ScanResult;
/**
+ * Default {@link IMappedProcessFactory} implementation
* @author hengsin
- *
*/
@Component(name = "org.idempiere.process.MappedProcessFactory",
immediate = true,
@@ -102,6 +102,7 @@ public class MappedProcessFactory extends MappedByNameFactory imple
}
}
+ /** Supplier class to create new ProcessCall instance */
private static final class ProcessCallSupplier implements Supplier {
private Constructor extends ProcessCall> constructor;
diff --git a/org.adempiere.base/src/org/idempiere/process/MigraID.java b/org.adempiere.base/src/org/idempiere/process/MigraID.java
index 77a3e07711..808a7a4f85 100644
--- a/org.adempiere.base/src/org/idempiere/process/MigraID.java
+++ b/org.adempiere.base/src/org/idempiere/process/MigraID.java
@@ -44,11 +44,12 @@ import org.compiere.util.DisplayType;
import org.compiere.util.Trx;
import org.compiere.util.Util;
+/**
+ * Process to replace a specific ID or UUID
+ */
@org.adempiere.base.annotation.Process
public class MigraID extends SvrProcess {
- // Process to change the ID of a record in the whole database
-
private int p_AD_Table_ID = -1;
private int p_ID_From = -1;
private int p_ID_To = -1;
diff --git a/org.adempiere.base/src/org/idempiere/process/TranslationImpExp.java b/org.adempiere.base/src/org/idempiere/process/TranslationImpExp.java
index 498efed942..0536653bfe 100644
--- a/org.adempiere.base/src/org/idempiere/process/TranslationImpExp.java
+++ b/org.adempiere.base/src/org/idempiere/process/TranslationImpExp.java
@@ -56,10 +56,12 @@ import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Util;
+/**
+ * Process to import or export translations
+ */
@org.adempiere.base.annotation.Process
public class TranslationImpExp extends SvrProcess {
-
- // Process to import or export translations
+
private String p_ImportOrExport;
private int p_AD_Client_ID; // Client
private String p_AD_Language;
diff --git a/org.adempiere.base/src/org/idempiere/process/VerifyMigration.java b/org.adempiere.base/src/org/idempiere/process/VerifyMigration.java
index fb74e5b20c..632deb517d 100644
--- a/org.adempiere.base/src/org/idempiere/process/VerifyMigration.java
+++ b/org.adempiere.base/src/org/idempiere/process/VerifyMigration.java
@@ -56,12 +56,12 @@ import org.compiere.process.SvrProcess;
import org.compiere.util.DB;
import org.compiere.util.Msg;
+/**
+ * Process to help verifying after a migration, check if customizations were overwritten
+ */
@org.adempiere.base.annotation.Process
public class VerifyMigration extends SvrProcess {
- // Process to help verifying after a migration, check if customizations were
- // overwritten
-
/* Date To */
private Timestamp p_DateTo = null;
/* SeqNo to insert into AD_VerifyMigration stepping 10 */
diff --git a/org.adempiere.base/src/org/idempiere/process/package-info.java b/org.adempiere.base/src/org/idempiere/process/package-info.java
new file mode 100644
index 0000000000..1b7c8bd830
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/process/package-info.java
@@ -0,0 +1,27 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide mapped process factory implementation.
+ * Provide classes for some iDempiere process.
+ */
+package org.idempiere.process;
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/idempiere/util/HistoryRuleSupportHash.java b/org.adempiere.base/src/org/idempiere/util/HistoryRuleSupportHash.java
index 7918059d5a..c67c854d87 100644
--- a/org.adempiere.base/src/org/idempiere/util/HistoryRuleSupportHash.java
+++ b/org.adempiere.base/src/org/idempiere/util/HistoryRuleSupportHash.java
@@ -21,7 +21,7 @@ import org.passay.PasswordData.HistoricalReference;
import org.passay.PasswordData.Reference;
/**
- * implement history password rule support hash password
+ * Implement history password rule support for hash password
* @author hieplq
*
*/
diff --git a/org.adempiere.base/src/org/idempiere/util/ParseSeq.java b/org.adempiere.base/src/org/idempiere/util/ParseSeq.java
index 5620b0fd4c..202ab8ecc5 100644
--- a/org.adempiere.base/src/org/idempiere/util/ParseSeq.java
+++ b/org.adempiere.base/src/org/idempiere/util/ParseSeq.java
@@ -18,13 +18,13 @@ import java.util.Iterator;
import java.util.regex.Pattern;
/**
- * This class help for parse order configuration
- * example problem in IDEMPIERE-2296. some people wish priority of "default value" is higher than "user value preference"
- * some other wish reverse.
- * it's better for define 1 is representative for "default value" and 2 is representative for "user value preference"
- * in configuration just set 12 or 21 for order configuration.
- *
- * this class will help by provide method same in Iterable, it's also provider validate for duplicate value as 221 or 211
+ * This class help to parse ordered configuration.
+ * For example, problem in IDEMPIERE-2296. Some wish priority of "default value" is higher than "user value preference"
+ * and some other wish the reverse of that.
+ * It is better to define 1 is representative for "default value" and 2 is representative for "user value preference",
+ * and in configuration just set 12 or 21 for an ordered configuration.
+ *
+ * This class will help by providing method similar to Iterable and it also provide validation for duplicate value such as 221 or 211.
* @author hieplq
*
*/
@@ -33,13 +33,14 @@ public class ParseSeq implements Iterable {
public static String MSG_NOT_NULL = "configuration must is a not null or non empty string";
public static String MSG_ONLY_NUNBER = "your value must contain only number character";
public static String MSG_CONTAIN_DUP = "your value must contain non duplicate character";
+
/**
- * init a Order configuration by parse configuration value,
- * configuration can contain duplicate value or contain only number
- * when detect wrong configuration value, a {@link IllegalArgumentException} will throw
+ * Init an Ordered configuration by parsing configuration value.
+ * Configuration can contain duplicate value or contain only number.
+ * When detected a wrong configuration value, will throw {@link IllegalArgumentException}.
*
- * @param orderConfiguration configuration value as "5ry76t"
- * @param allowDupCharacter if false configuration value as "1245648" is wrong value by "4" is duplicate
+ * @param orderConfiguration configuration value such as "5ry76t"
+ * @param allowDupCharacter if false configuration value as "1245648" is invalid since "4" is duplicate
* @param onlyNumber configuration value contain only number
*/
private ParseSeq (String orderConfiguration, boolean allowDupCharacter, boolean onlyNumber){
diff --git a/org.adempiere.base/src/org/idempiere/util/package-info.java b/org.adempiere.base/src/org/idempiere/util/package-info.java
new file mode 100644
index 0000000000..62c4b87878
--- /dev/null
+++ b/org.adempiere.base/src/org/idempiere/util/package-info.java
@@ -0,0 +1,26 @@
+/***********************************************************************
+ * 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. *
+ **********************************************************************/
+
+/**
+ * Provide utility classes
+ */
+package org.idempiere.util;
\ No newline at end of file
diff --git a/org.adempiere.install/src/org/adempiere/install/IDatabaseConfig.java b/org.adempiere.install/src/org/adempiere/install/IDatabaseConfig.java
index 3419968bfd..2913826c47 100644
--- a/org.adempiere.install/src/org/adempiere/install/IDatabaseConfig.java
+++ b/org.adempiere.install/src/org/adempiere/install/IDatabaseConfig.java
@@ -16,9 +16,8 @@ package org.adempiere.install;
import org.compiere.install.ConfigurationData;
/**
- *
+ * Database connection configuration interface
* @author hengsin
- *
*/
public interface IDatabaseConfig {
@@ -31,7 +30,7 @@ public interface IDatabaseConfig {
public String getDatabaseName(String nativeConnectioName);
/**
- * Init Configuration Data
+ * Initialize Configuration Data
* @param configurationData
*/
public void init(ConfigurationData configurationData);
diff --git a/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/Process.java b/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/Process.java
index 512fb1aed1..c6c916b130 100644
--- a/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/Process.java
+++ b/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/Process.java
@@ -330,7 +330,7 @@ public class Process {
{
int AD_Workflow_ID = process.getAD_Workflow_ID();
MWorkflow wf = MWorkflow.get (Env.getCtx(), AD_Workflow_ID);
- MWFProcess wfProcess = wf.startWait(pi); // may return null
+ MWFProcess wfProcess = wf.start(pi, (String)null); // may return null
if(wfProcess != null)
{
//wynik