IDEMPIERE-5838 Base: Improve readability of code (#2179)
* IDEMPIERE-5838 Base: Improve readability of code * IDEMPIERE-5838 Base: Improve readability of code
This commit is contained in:
parent
578e942f20
commit
b912996243
|
@ -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;
|
|
@ -27,6 +27,9 @@ import org.compiere.model.I_M_RMALine;
|
||||||
import org.compiere.model.I_M_RequisitionLine;
|
import org.compiere.model.I_M_RequisitionLine;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract base class for {@link IProductPricing} implementation
|
||||||
|
*/
|
||||||
public abstract class AbstractProductPricing implements IProductPricing {
|
public abstract class AbstractProductPricing implements IProductPricing {
|
||||||
|
|
||||||
protected int m_M_Product_ID;
|
protected int m_M_Product_ID;
|
||||||
|
|
|
@ -47,9 +47,9 @@ import io.github.classgraph.ClassGraph.ScanResultProcessor;
|
||||||
import io.github.classgraph.ClassInfo;
|
import io.github.classgraph.ClassInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Abstract base class for annotation driven implementation of {@link IColumnCalloutFactory}.<br/>
|
||||||
|
* Subclass would override the {@link #getPackages()} method to provide the packages for {@link Callout} annotation scanning and discovery.
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public abstract class AnnotationBasedColumnCalloutFactory extends AnnotationBasedFactory implements IColumnCalloutFactory {
|
public abstract class AnnotationBasedColumnCalloutFactory extends AnnotationBasedFactory implements IColumnCalloutFactory {
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,8 @@ import org.osgi.framework.Filter;
|
||||||
import org.osgi.util.tracker.ServiceTracker;
|
import org.osgi.util.tracker.ServiceTracker;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Activator for org.adempiere.base bundle.
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class BaseActivator implements BundleActivator {
|
public class BaseActivator implements BundleActivator {
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,8 @@ package org.adempiere.base;
|
||||||
import org.osgi.service.component.annotations.Component;
|
import org.osgi.service.component.annotations.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Default implementation of {@link AnnotationBasedColumnCalloutFactory} that would scan the org.adempiere.model package
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Component(immediate = true, service = IColumnCalloutFactory.class)
|
@Component(immediate = true, service = IColumnCalloutFactory.class)
|
||||||
public class DefaultAnnotationBasedColumnCalloutFactory extends AnnotationBasedColumnCalloutFactory {
|
public class DefaultAnnotationBasedColumnCalloutFactory extends AnnotationBasedColumnCalloutFactory {
|
||||||
|
|
|
@ -26,6 +26,9 @@ package org.adempiere.base;
|
||||||
|
|
||||||
import org.osgi.service.component.annotations.Component;
|
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})
|
@Component(immediate = true, service = {DefaultAnnotationBasedEventManager.class})
|
||||||
public class DefaultAnnotationBasedEventManager extends AnnotationBasedEventManager {
|
public class DefaultAnnotationBasedEventManager extends AnnotationBasedEventManager {
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,11 @@ package org.adempiere.base;
|
||||||
import org.osgi.service.component.annotations.Component;
|
import org.osgi.service.component.annotations.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Default implementation of {@link AnnotationBasedProcessFactory} that would scan the following packages:<br/>
|
||||||
|
* "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
|
* @author hengsin
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Component(immediate = true, service = IProcessFactory.class, property = {"service.ranking:Integer=-1"})
|
@Component(immediate = true, service = IProcessFactory.class, property = {"service.ranking:Integer=-1"})
|
||||||
public final class DefaultAnnotationBasedProcessFactory extends AnnotationBasedProcessFactory {
|
public final class DefaultAnnotationBasedProcessFactory extends AnnotationBasedProcessFactory {
|
||||||
|
|
|
@ -53,9 +53,7 @@ public interface IMappedDocumentFactory {
|
||||||
public void removeMapping(String gaap, String tableName);
|
public void removeMapping(String gaap, String tableName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Parameter class for doc supplier
|
||||||
* parameter class for doc supplier
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public final static class Parameter {
|
public final static class Parameter {
|
||||||
public MAcctSchema as;
|
public MAcctSchema as;
|
||||||
|
|
|
@ -29,6 +29,7 @@ import org.osgi.framework.BundleException;
|
||||||
import org.osgi.framework.FrameworkUtil;
|
import org.osgi.framework.FrameworkUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Eclipse application to launch the swing based model generation dialog.
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
* @author tbayen - command line start
|
* @author tbayen - command line start
|
||||||
*
|
*
|
||||||
|
|
|
@ -41,8 +41,8 @@ import org.eclipse.equinox.app.IApplication;
|
||||||
import org.eclipse.equinox.app.IApplicationContext;
|
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)
|
* @author Carlos Ruiz (globalqss)
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class PackInFolderApplication implements IApplication {
|
public class PackInFolderApplication implements IApplication {
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,9 @@ import org.eclipse.equinox.app.IApplication;
|
||||||
import org.eclipse.equinox.app.IApplicationContext;
|
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
|
* @author hengsin
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class PostMigrationApplication implements IApplication {
|
public class PostMigrationApplication implements IApplication {
|
||||||
|
|
||||||
|
|
|
@ -31,9 +31,8 @@ import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* To support the use of multiple {@link Callout} annotation
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
|
|
|
@ -18,6 +18,9 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Annotation for iDempiere process
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(TYPE)
|
@Target(TYPE)
|
||||||
public @interface Process {
|
public @interface Process {
|
||||||
|
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
|
@ -14,9 +14,8 @@
|
||||||
package org.adempiere.base.event;
|
package org.adempiere.base.event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Value object for name based event property
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class EventProperty {
|
public class EventProperty {
|
||||||
public String name;
|
public String name;
|
||||||
|
|
|
@ -32,14 +32,13 @@ import java.lang.annotation.Target;
|
||||||
|
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for handling of after load preference event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.PREF_AFTER_LOAD)
|
@EventTopic(topic = IEventTopics.PREF_AFTER_LOAD)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterLoadPref {
|
public @interface AfterLoadPref {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,14 +32,13 @@ import java.lang.annotation.Target;
|
||||||
|
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for handling of after login event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.AFTER_LOGIN)
|
@EventTopic(topic = IEventTopics.AFTER_LOGIN)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterLogin {
|
public @interface AfterLogin {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,7 @@ import org.osgi.service.event.Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event delegate for login event.<br/>
|
* Event delegate for login event.<br/>
|
||||||
* To handle login event, create a subclass of this and uses the {@link AfterLogin} annotation to
|
* To handle login event, create a subclass of this and implement the {@link #onAfterLogin(LoginEventData)} method.
|
||||||
* annotate the method for the login event topic.
|
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*/
|
*/
|
||||||
public abstract class AfterLoginEventDelegate extends EventDelegate {
|
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}
|
* @return {@link LoginEventData}
|
||||||
*/
|
*/
|
||||||
protected LoginEventData getLoginEventData() {
|
protected LoginEventData getLoginEventData() {
|
||||||
|
|
|
@ -32,14 +32,13 @@ import java.lang.annotation.Target;
|
||||||
|
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for handling of broadcast message event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.BROADCAST_MESSAGE)
|
@EventTopic(topic = IEventTopics.BROADCAST_MESSAGE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface BroadcastMsg {
|
public @interface BroadcastMsg {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,12 +27,10 @@ package org.adempiere.base.event.annotations;
|
||||||
import org.osgi.service.event.Event;
|
import org.osgi.service.event.Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* Annotation driven event delegate base class that works together with {@link BaseEventHandler}.<br/>
|
* Annotation driven event delegate base class that works together with {@link BaseEventHandler}.<br/>
|
||||||
* Subclass implementation doesn't have to be thread safe as event delegate is create and throw away for each event call.<br/>
|
* Subclass implementation doesn't have to be thread safe as event delegate is create and throw away for each event call.<br/>
|
||||||
* 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
|
* @author hengsin
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class EventDelegate {
|
public class EventDelegate {
|
||||||
|
|
||||||
|
|
|
@ -31,13 +31,17 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for OSGi event topic. <br/>
|
||||||
|
* 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)
|
@Retention(RUNTIME)
|
||||||
@Target({ METHOD, ANNOTATION_TYPE })
|
@Target({ METHOD, ANNOTATION_TYPE })
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface EventTopic {
|
public @interface EventTopic {
|
||||||
|
/**
|
||||||
|
* Get OSGi event topic name
|
||||||
|
* @return event topic name
|
||||||
|
*/
|
||||||
String topic();
|
String topic();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ import org.osgi.service.event.Event;
|
||||||
/**
|
/**
|
||||||
* Event delegate for PO related event.<br/>
|
* Event delegate for PO related event.<br/>
|
||||||
* To handle a model event, create a subclass of this and uses the model event annotation (BeforeChange, BeforeComplete, etc)
|
* 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
|
* @author hengsin
|
||||||
*
|
*
|
||||||
* @param <T>
|
* @param <T>
|
||||||
|
@ -49,6 +49,7 @@ public class ModelEventDelegate<T extends PO> extends EventDelegate {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get PO model for event
|
||||||
* @return PO model (MBPartner, MOrder, etc)
|
* @return PO model (MBPartner, MOrder, etc)
|
||||||
*/
|
*/
|
||||||
protected T getModel() {
|
protected T getModel() {
|
||||||
|
|
|
@ -32,14 +32,13 @@ import java.lang.annotation.Target;
|
||||||
|
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for handling of send request email event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.REQUEST_SEND_EMAIL)
|
@EventTopic(topic = IEventTopics.REQUEST_SEND_EMAIL)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface RequestSendEMail {
|
public @interface RequestSendEMail {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ public abstract class RequestSendEmailEventDelegate extends EventDelegate {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override this to handle event
|
* Override this to handle RequestSendEMail event
|
||||||
* @param requestSendEMailEventData
|
* @param requestSendEMailEventData
|
||||||
*/
|
*/
|
||||||
protected abstract void onRequestSendEmail(RequestSendEMailEventData requestSendEMailEventData);
|
protected abstract void onRequestSendEmail(RequestSendEMailEventData requestSendEMailEventData);
|
||||||
|
|
|
@ -26,10 +26,12 @@ package org.adempiere.base.event.annotations;
|
||||||
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
|
import org.adempiere.base.AnnotationBasedEventManager;
|
||||||
import org.osgi.service.event.Event;
|
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).<br/>
|
||||||
|
* This is use by {@link AnnotationBasedEventManager} and usually developer doesn't have to use this class directly.
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for after close document action event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.DOC_AFTER_CLOSE)
|
@EventTopic(topic = IEventTopics.DOC_AFTER_CLOSE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterClose {
|
public @interface AfterClose {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for after complete document action event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.DOC_AFTER_COMPLETE)
|
@EventTopic(topic = IEventTopics.DOC_AFTER_COMPLETE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterComplete {
|
public @interface AfterComplete {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for after post document action event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.DOC_AFTER_POST)
|
@EventTopic(topic = IEventTopics.DOC_AFTER_POST)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterPost {
|
public @interface AfterPost {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for after prepare document action event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.DOC_AFTER_PREPARE)
|
@EventTopic(topic = IEventTopics.DOC_AFTER_PREPARE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterPrepare {
|
public @interface AfterPrepare {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for after re-activate document action event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.DOC_AFTER_REACTIVATE)
|
@EventTopic(topic = IEventTopics.DOC_AFTER_REACTIVATE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterReactivate {
|
public @interface AfterReactivate {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for after reverse accrual document action event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.DOC_AFTER_REVERSEACCRUAL)
|
@EventTopic(topic = IEventTopics.DOC_AFTER_REVERSEACCRUAL)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterReverseAccrual {
|
public @interface AfterReverseAccrual {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for after reverse correct document action event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.DOC_AFTER_REVERSECORRECT)
|
@EventTopic(topic = IEventTopics.DOC_AFTER_REVERSECORRECT)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterReverseCorrect {
|
public @interface AfterReverseCorrect {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for after void document action event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.DOC_AFTER_VOID)
|
@EventTopic(topic = IEventTopics.DOC_AFTER_VOID)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterVoid {
|
public @interface AfterVoid {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for before close document action event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.DOC_BEFORE_CLOSE)
|
@EventTopic(topic = IEventTopics.DOC_BEFORE_CLOSE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface BeforeClose {
|
public @interface BeforeClose {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for before complete document action event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.DOC_BEFORE_COMPLETE)
|
@EventTopic(topic = IEventTopics.DOC_BEFORE_COMPLETE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface BeforeComplete {
|
public @interface BeforeComplete {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for before post document action event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.DOC_BEFORE_POST)
|
@EventTopic(topic = IEventTopics.DOC_BEFORE_POST)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface BeforePost {
|
public @interface BeforePost {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for before prepare document action event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.DOC_BEFORE_PREPARE)
|
@EventTopic(topic = IEventTopics.DOC_BEFORE_PREPARE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface BeforePrepare {
|
public @interface BeforePrepare {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for before re-activate document action event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.DOC_BEFORE_REACTIVATE)
|
@EventTopic(topic = IEventTopics.DOC_BEFORE_REACTIVATE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface BeforeReactivate {
|
public @interface BeforeReactivate {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for before reverse accrual document action event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.DOC_BEFORE_REVERSEACCRUAL)
|
@EventTopic(topic = IEventTopics.DOC_BEFORE_REVERSEACCRUAL)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface BeforeReverseAccrual {
|
public @interface BeforeReverseAccrual {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for before reverse correct document action event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.DOC_BEFORE_REVERSECORRECT)
|
@EventTopic(topic = IEventTopics.DOC_BEFORE_REVERSECORRECT)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface BeforeReverseCorrect {
|
public @interface BeforeReverseCorrect {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for before void document action event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.DOC_BEFORE_VOID)
|
@EventTopic(topic = IEventTopics.DOC_BEFORE_VOID)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface BeforeVoid {
|
public @interface BeforeVoid {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for get available document actions event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.DOCACTION)
|
@EventTopic(topic = IEventTopics.DOCACTION)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface DocAction {
|
public @interface DocAction {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for accounting facts validation event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.ACCT_FACTS_VALIDATE)
|
@EventTopic(topic = IEventTopics.ACCT_FACTS_VALIDATE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface FactsValidate {
|
public @interface FactsValidate {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,9 +31,9 @@ import org.compiere.model.PO;
|
||||||
import org.osgi.service.event.Event;
|
import org.osgi.service.event.Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event delegate for facts validate event.<br/>
|
* Event delegate for accounting facts validation event.<br/>
|
||||||
* To handle facts validate event, create a subclass of this and uses the {@link FactsValidate} annotation
|
* 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
|
* @author hengsin
|
||||||
*/
|
*/
|
||||||
public abstract class FactsValidateDelegate<T extends PO> extends ModelEventDelegate<T> {
|
public abstract class FactsValidateDelegate<T extends PO> extends ModelEventDelegate<T> {
|
||||||
|
|
|
@ -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;
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for after import event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.IMPORT_AFTER_IMPORT)
|
@EventTopic(topic = IEventTopics.IMPORT_AFTER_IMPORT)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterImport {
|
public @interface AfterImport {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for after validate event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.IMPORT_AFTER_VALIDATE)
|
@EventTopic(topic = IEventTopics.IMPORT_AFTER_VALIDATE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterValidate {
|
public @interface AfterValidate {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for before import event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.IMPORT_BEFORE_IMPORT)
|
@EventTopic(topic = IEventTopics.IMPORT_BEFORE_IMPORT)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface BeforeImport {
|
public @interface BeforeImport {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for before validate event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.IMPORT_BEFORE_VALIDATE)
|
@EventTopic(topic = IEventTopics.IMPORT_BEFORE_VALIDATE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface BeforeValidate {
|
public @interface BeforeValidate {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ import org.osgi.service.event.Event;
|
||||||
/**
|
/**
|
||||||
* Event delegate for import event.<br/>
|
* Event delegate for import event.<br/>
|
||||||
* To handle an import event, create a sub class of this and uses the import event annotation (AfterImport, BeforeImport, etc)
|
* 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
|
* @author hengsin
|
||||||
*/
|
*/
|
||||||
public class ImportEventDelegate extends EventDelegate {
|
public class ImportEventDelegate extends EventDelegate {
|
||||||
|
@ -45,7 +45,7 @@ public class ImportEventDelegate extends EventDelegate {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Get data object for import event
|
||||||
* @return {@link ImportEventData}
|
* @return {@link ImportEventData}
|
||||||
*/
|
*/
|
||||||
protected ImportEventData getImportEventData() {
|
protected ImportEventData getImportEventData() {
|
||||||
|
|
|
@ -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;
|
|
@ -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. <br/>
|
||||||
|
* 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;
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for after change event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.PO_AFTER_CHANGE)
|
@EventTopic(topic = IEventTopics.PO_AFTER_CHANGE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterChange {
|
public @interface AfterChange {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for replication after change event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.PO_AFTER_CHANGE_REPLICATION)
|
@EventTopic(topic = IEventTopics.PO_AFTER_CHANGE_REPLICATION)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterChangeReplication {
|
public @interface AfterChangeReplication {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for after delete event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.PO_AFTER_DELETE)
|
@EventTopic(topic = IEventTopics.PO_AFTER_DELETE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterDelete {
|
public @interface AfterDelete {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,13 +33,12 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for after new event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.PO_AFTER_NEW)
|
@EventTopic(topic = IEventTopics.PO_AFTER_NEW)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterNew {
|
public @interface AfterNew {
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for replication after new event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.PO_AFTER_NEW_REPLICATION)
|
@EventTopic(topic = IEventTopics.PO_AFTER_NEW_REPLICATION)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterNewReplication {
|
public @interface AfterNewReplication {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for before change event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.PO_BEFORE_CHANGE)
|
@EventTopic(topic = IEventTopics.PO_BEFORE_CHANGE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface BeforeChange {
|
public @interface BeforeChange {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for before delete event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.PO_BEFORE_DELETE)
|
@EventTopic(topic = IEventTopics.PO_BEFORE_DELETE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface BeforeDelete {
|
public @interface BeforeDelete {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for replication before delete event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.PO_BEFORE_DELETE_REPLICATION)
|
@EventTopic(topic = IEventTopics.PO_BEFORE_DELETE_REPLICATION)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface BeforeDeleteReplication {
|
public @interface BeforeDeleteReplication {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,13 +33,12 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for before new event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@EventTopic(topic = IEventTopics.PO_BEFORE_NEW)
|
@EventTopic(topic = IEventTopics.PO_BEFORE_NEW)
|
||||||
public @interface BeforeNew {
|
public @interface BeforeNew {
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for post create event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.PO_POST_CREATE)
|
@EventTopic(topic = IEventTopics.PO_POST_CREATE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface PostCreate {
|
public @interface PostCreate {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for post delete event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.PO_POST_DELETE)
|
@EventTopic(topic = IEventTopics.PO_POST_DELETE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface PostDelete {
|
public @interface PostDelete {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for post update event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.PO_POST_UPADTE)
|
@EventTopic(topic = IEventTopics.PO_POST_UPADTE)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface PostUpdate {
|
public @interface PostUpdate {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for after process event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.AFTER_PROCESS)
|
@EventTopic(topic = IEventTopics.AFTER_PROCESS)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AfterProcess {
|
public @interface AfterProcess {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for before process event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.BEFORE_PROCESS)
|
@EventTopic(topic = IEventTopics.BEFORE_PROCESS)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface BeforeProcess {
|
public @interface BeforeProcess {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@ import java.lang.annotation.Target;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.base.event.annotations.EventTopic;
|
import org.adempiere.base.event.annotations.EventTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method annotation for post process event
|
||||||
|
* @author hengsin
|
||||||
|
*/
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(METHOD)
|
@Target(METHOD)
|
||||||
@EventTopic(topic = IEventTopics.POST_PROCESS)
|
@EventTopic(topic = IEventTopics.POST_PROCESS)
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author hengsin
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface PostProcess {
|
public @interface PostProcess {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ import org.osgi.service.event.Event;
|
||||||
/**
|
/**
|
||||||
* Event delegate for handling of process event.<br/>
|
* Event delegate for handling of process event.<br/>
|
||||||
* To handle a process related event topic, create a sub class of this and uses the process annotation
|
* 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
|
* @author hengsin
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -43,6 +43,7 @@ public class ProcessEventDelegate extends EventDelegate {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get process info
|
||||||
* @return {@link ProcessInfo}
|
* @return {@link ProcessInfo}
|
||||||
*/
|
*/
|
||||||
protected ProcessInfo getProcessInfo() {
|
protected ProcessInfo getProcessInfo() {
|
||||||
|
|
|
@ -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;
|
|
@ -38,16 +38,14 @@ import org.compiere.model.MSysConfig;
|
||||||
import org.osgi.service.event.Event;
|
import org.osgi.service.event.Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Event delegate to perform validation for insert and update of MLocation record.
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@EventTopicDelegate
|
@EventTopicDelegate
|
||||||
@ModelEventTopic(modelClass = MLocation.class)
|
@ModelEventTopic(modelClass = MLocation.class)
|
||||||
public class AddressValidationEventDelegate extends ModelEventDelegate<MLocation> {
|
public class AddressValidationEventDelegate extends ModelEventDelegate<MLocation> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param po
|
* @param po
|
||||||
* @param event
|
* @param event
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -48,15 +48,13 @@ import org.eevolution.model.MPPProductBOMLine;
|
||||||
import org.osgi.service.event.Event;
|
import org.osgi.service.event.Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Event delegate to implement auto produce for shipment
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@EventTopicDelegate
|
@EventTopicDelegate
|
||||||
@ModelEventTopic(modelClass = MInOut.class)
|
@ModelEventTopic(modelClass = MInOut.class)
|
||||||
public class AutoProduceEventDelegate extends ModelEventDelegate<MInOut> {
|
public class AutoProduceEventDelegate extends ModelEventDelegate<MInOut> {
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param po
|
* @param po
|
||||||
* @param event
|
* @param event
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
|
@ -15,8 +15,8 @@ package org.adempiere.base.sso;
|
||||||
import org.compiere.model.I_SSO_PrincipalConfig;
|
import org.compiere.model.I_SSO_PrincipalConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Factory interface for single sign on service
|
||||||
* @author Logilite Technologies
|
* @author Logilite Technologies
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public interface ISSOPrincipalFactory
|
public interface ISSOPrincipalFactory
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,6 +21,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
import org.compiere.util.Language;
|
import org.compiere.util.Language;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Single sign on service interface
|
||||||
* @author Logilite Technologies
|
* @author Logilite Technologies
|
||||||
*/
|
*/
|
||||||
public interface ISSOPrincipalService
|
public interface ISSOPrincipalService
|
||||||
|
|
|
@ -24,6 +24,7 @@ import org.compiere.model.MSSOPrincipalConfig;
|
||||||
import org.compiere.util.CCache;
|
import org.compiere.util.CCache;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Utility methods for single sign on support.
|
||||||
* @author Logilite Technologies
|
* @author Logilite Technologies
|
||||||
*/
|
*/
|
||||||
public class SSOUtils
|
public class SSOUtils
|
||||||
|
@ -52,6 +53,10 @@ public class SSOUtils
|
||||||
ignoreResourceURL.add("res");
|
ignoreResourceURL.add("res");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get single sign on service
|
||||||
|
* @return single sign on service
|
||||||
|
*/
|
||||||
public static ISSOPrincipalService getSSOPrincipalService()
|
public static ISSOPrincipalService getSSOPrincipalService()
|
||||||
{
|
{
|
||||||
ISSOPrincipalService principal = null;
|
ISSOPrincipalService principal = null;
|
||||||
|
@ -91,9 +96,9 @@ public class SSOUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Error page for error message
|
* Create HTML page for error message
|
||||||
* @param error
|
* @param error
|
||||||
* @return
|
* @return HTML error page
|
||||||
*/
|
*/
|
||||||
public static String getCreateErrorResponce(String error)
|
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 request
|
||||||
* @param isWebUI
|
* @param isWebUI
|
||||||
* @return
|
* @return true if request is a resource request
|
||||||
*/
|
*/
|
||||||
public static boolean isResourceRequest(HttpServletRequest request, boolean isWebUI)
|
public static boolean isResourceRequest(HttpServletRequest request, boolean isWebUI)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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;
|
|
@ -28,16 +28,18 @@ package org.adempiere.base.upload;
|
||||||
import org.compiere.model.MAuthorizationAccount;
|
import org.compiere.model.MAuthorizationAccount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* handler interface for upload request
|
* Handler interface for upload of media
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*/
|
*/
|
||||||
public interface IUploadHandler {
|
public interface IUploadHandler {
|
||||||
/**
|
/**
|
||||||
|
* Get label/name for this handler.
|
||||||
* @return label for handler
|
* @return label for handler
|
||||||
*/
|
*/
|
||||||
public String getLabel();
|
public String getLabel();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Upload media to external authorized account
|
||||||
* @param media
|
* @param media
|
||||||
* @param account external account to upload to (for e.g, Google drive account)
|
* @param account external account to upload to (for e.g, Google drive account)
|
||||||
* @return {@link UploadResponse}
|
* @return {@link UploadResponse}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
package org.adempiere.base.upload;
|
package org.adempiere.base.upload;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* interface for upload service
|
* Interface for upload service
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -28,9 +28,8 @@ package org.adempiere.base.upload;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* representation of media
|
* Representation of upload media
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class UploadMedia {
|
public class UploadMedia {
|
||||||
|
|
||||||
|
@ -54,6 +53,7 @@ public class UploadMedia {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get content type of media
|
||||||
* @return content type of media
|
* @return content type of media
|
||||||
*/
|
*/
|
||||||
public String getContentType() {
|
public String getContentType() {
|
||||||
|
@ -61,6 +61,7 @@ public class UploadMedia {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get media name
|
||||||
* @return name/label of media
|
* @return name/label of media
|
||||||
*/
|
*/
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
@ -68,6 +69,7 @@ public class UploadMedia {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get input stream for media content
|
||||||
* @return {@link InputStream} for media content
|
* @return {@link InputStream} for media content
|
||||||
*/
|
*/
|
||||||
public InputStream getInputStream() {
|
public InputStream getInputStream() {
|
||||||
|
@ -75,6 +77,7 @@ public class UploadMedia {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get length of media content
|
||||||
* @return length of media content
|
* @return length of media content
|
||||||
*/
|
*/
|
||||||
public long getContentLength() {
|
public long getContentLength() {
|
||||||
|
|
|
@ -28,7 +28,6 @@ package org.adempiere.base.upload;
|
||||||
/**
|
/**
|
||||||
* Response from upload service
|
* Response from upload service
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class UploadResponse {
|
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
|
* @return link URL to the uploaded file
|
||||||
*/
|
*/
|
||||||
public String getLink() {
|
public String getLink() {
|
||||||
|
@ -53,6 +53,7 @@ public class UploadResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get label for the uploaded file
|
||||||
* @return label for the uploaded file
|
* @return label for the uploaded file
|
||||||
*/
|
*/
|
||||||
public String getLinkLabel() {
|
public String getLinkLabel() {
|
||||||
|
|
|
@ -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;
|
|
@ -20,16 +20,15 @@ import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
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
|
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
|
||||||
*/
|
*/
|
||||||
public class AdempiereException extends RuntimeException {
|
public class AdempiereException extends RuntimeException {
|
||||||
/**
|
/**
|
||||||
*
|
* generated serial id
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 2340179640558569534L;
|
private static final long serialVersionUID = 2340179640558569534L;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default Constructor (saved logger error will be used as message)
|
* Default Constructor (saved logger error will be used as message)
|
||||||
*/
|
*/
|
||||||
|
@ -37,7 +36,6 @@ public class AdempiereException extends RuntimeException {
|
||||||
this(getMessageFromLogger());
|
this(getMessageFromLogger());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param message
|
* @param message
|
||||||
*/
|
*/
|
||||||
|
@ -67,11 +65,14 @@ public class AdempiereException extends RuntimeException {
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get environment context
|
||||||
|
* @return context
|
||||||
|
*/
|
||||||
protected Properties getCtx() {
|
protected Properties getCtx() {
|
||||||
return Env.getCtx();
|
return Env.getCtx();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return error message from logger
|
* @return error message from logger
|
||||||
* @see org.compiere.util.CLogger#retrieveError()
|
* @see org.compiere.util.CLogger#retrieveError()
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
package org.adempiere.exceptions;
|
package org.adempiere.exceptions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Exception raise when current quantity of a product's average costing record become negative
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -15,9 +15,8 @@
|
||||||
package org.adempiere.exceptions;
|
package org.adempiere.exceptions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Exception raise when current quantity of a product's average costing record is zero
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class AverageCostingZeroQtyException extends AdempiereException {
|
public class AverageCostingZeroQtyException extends AdempiereException {
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
import org.compiere.util.Util;
|
import org.compiere.util.Util;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This RuntimeException is used to pass SQLException up the chain of calling
|
* This RuntimeException is used to pass SQLException up the chain of calling
|
||||||
* methods to determine what to do where needed.
|
* methods to determine what to do where needed.
|
||||||
|
|
|
@ -15,12 +15,13 @@ package org.adempiere.exceptions;
|
||||||
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import org.adempiere.model.MRelationType;
|
||||||
import org.compiere.model.PO;
|
import org.compiere.model.PO;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Exception related to invalid {@link MRelationType} configuration.
|
||||||
* @author Tobias Schoeneberg, www.metas.de - FR [ 2897194 ] Advanced Zoom and
|
* @author Tobias Schoeneberg, www.metas.de - FR [ 2897194 ] Advanced Zoom and
|
||||||
* RelationTypes
|
* RelationTypes
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.adempiere.exceptions;
|
package org.adempiere.exceptions;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Throw when a tax criteria was not found
|
* Throw when a tax criteria was not found
|
||||||
* @author Teo Sarca, www.arhipac.ro
|
* @author Teo Sarca, www.arhipac.ro
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.adempiere.exceptions;
|
package org.adempiere.exceptions;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Throw when there is no Warehouse for Organization.
|
* Throw when there is no Warehouse for Organization.
|
||||||
* @author victor.perez@e-evolution.com, www.e-evolution.com
|
* @author victor.perez@e-evolution.com, www.e-evolution.com
|
||||||
|
|
|
@ -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;
|
|
@ -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;
|
|
@ -33,8 +33,8 @@ import org.compiere.util.DisplayType;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Callout for AD_InfoWindow and AD_InfoColumn
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Callout(tableName = "AD_InfoWindow", columnName = "AD_Table_ID")
|
@Callout(tableName = "AD_InfoWindow", columnName = "AD_Table_ID")
|
||||||
@Callout(tableName = "AD_InfoColumn", columnName = {"AD_Element_ID","AD_Reference_ID"})
|
@Callout(tableName = "AD_InfoColumn", columnName = {"AD_Element_ID","AD_Reference_ID"})
|
||||||
|
|
|
@ -50,7 +50,7 @@ import org.compiere.util.TimeUtil;
|
||||||
import org.compiere.util.Util;
|
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.
|
* @see {@link MProjectIssue} for example usage.
|
||||||
* @author hengsin
|
* @author hengsin
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -34,7 +34,7 @@ import org.compiere.process.DocAction;
|
||||||
/**
|
/**
|
||||||
* Generic PO implementation, this can be use together with ModelValidator as alternative to the classic
|
* Generic PO implementation, this can be use together with ModelValidator as alternative to the classic
|
||||||
* generated model class and extend ( X_ and M_ ) approach.
|
* generated model class and extend ( X_ and M_ ) approach.
|
||||||
*
|
* <p>
|
||||||
* Originally for used to insert/update data from adempieredata.xml file in 2pack.
|
* Originally for used to insert/update data from adempieredata.xml file in 2pack.
|
||||||
* @author Marco LOMBARDO
|
* @author Marco LOMBARDO
|
||||||
* @contributor Low Heng Sin
|
* @contributor Low Heng Sin
|
||||||
|
@ -155,7 +155,7 @@ public class GenericPO extends PO implements DocAction {
|
||||||
return docActionDelegate.getDocStatus();
|
return docActionDelegate.getDocStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**
|
||||||
* Process document
|
* Process document
|
||||||
* @param processAction document action
|
* @param processAction document action
|
||||||
* @return true if performed
|
* @return true if performed
|
||||||
|
@ -280,7 +280,7 @@ public class GenericPO extends PO implements DocAction {
|
||||||
return docActionDelegate.reActivateIt();
|
return docActionDelegate.reActivateIt();
|
||||||
} // reActivateIt
|
} // reActivateIt
|
||||||
|
|
||||||
/*************************************************************************
|
/**
|
||||||
* Get Summary
|
* Get Summary
|
||||||
* @return Summary of Document
|
* @return Summary of Document
|
||||||
*/
|
*/
|
||||||
|
@ -348,7 +348,7 @@ public class GenericPO extends PO implements DocAction {
|
||||||
*/
|
*/
|
||||||
class PropertiesWrapper extends Properties {
|
class PropertiesWrapper extends Properties {
|
||||||
/**
|
/**
|
||||||
*
|
* generated serial id
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 8887531951501323594L;
|
private static final long serialVersionUID = 8887531951501323594L;
|
||||||
protected Properties source;
|
protected Properties source;
|
||||||
|
|
|
@ -28,7 +28,7 @@ import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrap GridTab to ADempiere Model Interface (i.e. generated interfaces).<br/>
|
* Wrap GridTab to iDempiere Model Interface (i.e. generated interfaces).<br/>
|
||||||
* Usage example:
|
* Usage example:
|
||||||
* <pre>
|
* <pre>
|
||||||
* I_A_Asset_Disposed bean = GridTabWrapper.create(mTab, I_A_Asset_Disposed.class);
|
* 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.
|
* Create wrapper of type cl for gridTab.
|
||||||
* @param <T>
|
* @param <T> iDempiere Model Interface (i.e. generated I_* interfaces) type
|
||||||
* @param gridTab
|
* @param gridTab
|
||||||
* @param cl
|
* @param cl iDempiere Model Interface (i.e. generated I_* interfaces) class
|
||||||
* @return wrapper instance for gridTab
|
* @return wrapped instance for gridTab
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static <T> T create(GridTab gridTab, Class<T> cl)
|
public static <T> T create(GridTab gridTab, Class<T> cl)
|
||||||
|
@ -68,7 +68,7 @@ public class GridTabWrapper implements InvocationHandler
|
||||||
this.m_gridTab = gridTab;
|
this.m_gridTab = gridTab;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
@Override
|
||||||
public Object invoke(Object proxy, Method method, Object[] args)
|
public Object invoke(Object proxy, Method method, Object[] args)
|
||||||
throws Throwable
|
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()
|
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.<br/>
|
||||||
* Example: getReferencedObject("M_Product", method) should load the M_Product record
|
* Example: getReferencedObject("M_Product", method) should load the M_Product record
|
||||||
* with ID given by M_Product_ID property name;
|
* with ID given by M_Product_ID property name;
|
||||||
* @param propertyName
|
* @param propertyName
|
||||||
* @param method
|
* @param method
|
||||||
* @return
|
* @return referenced instance
|
||||||
*/
|
*/
|
||||||
private final Object getReferencedObject(String propertyName, Method method)
|
private final Object getReferencedObject(String propertyName, Method method)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,6 @@ import org.compiere.model.MAddressTransaction;
|
||||||
/**
|
/**
|
||||||
* Address validation interface
|
* Address validation interface
|
||||||
* @author Elaine
|
* @author Elaine
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public interface IAddressValidation {
|
public interface IAddressValidation {
|
||||||
/**
|
/**
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue