Package ru.bgcrm.util
Class ProcessUtils
java.lang.Object
ru.bgcrm.util.ProcessUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopyAddressToProcess(LinkAddedEvent event, Connection connection, int addressParameterId) static voidcopyExecutorsAndGroups(Process process, Set<Process> from, Connection connection) static voidcopyPhonesToProcess(LinkAddedEvent event, Connection connection) static ProcesscreateLinkedProcess(Connection con, int processTypeId, int linkedObjectId, String parentObjectId, String linkedObjectTitle) static ProcesscreateProcess(Connection con, int processTypeId) static ProcesscreateProcessWithLinkedObject(Connection con, int processTypeId, int linkedObjectId, String linkedObjectType, String linkedObjectTitle) getExecutorsTitlesWithRole(Connection connection, int roleParamValue, Process process, int roleId) static @NotNull StringgetHtmlTableRepresentation(int processId, Connection connection) Получение табличной HTML-репрезентации процессаgetParamAndValueTitles(int processId, Connection connection) Получение заголовков и значений параметров процессаstatic @Nullable ParameterAddressValuegetParameterAddressValue(Connection connection, User user, String billingId, int contractId) static @NotNull ProcessgetProcess(int processId) static @Nullable ProcessgetProcess(Event event) static ProcessTypegetProcessTypeFromProcessId(Connection connection, int processId) static booleanisProcessEvent(Event event) static voidlinkProcess(Connection con, int objectId, String objectType, int linkedObjectId, String linkedObjectTitle) static voidsendProcessCreate(int linkedObjectId, String linkedObjectType, String linkedObjectTitle, int processTypeId, String description, Map<String, Object> paramsMap)
-
Constructor Details
-
ProcessUtils
public ProcessUtils()
-
-
Method Details
-
copyAddressToProcess
public static void copyAddressToProcess(LinkAddedEvent event, Connection connection, int addressParameterId) throws BGException - Throws:
BGException
-
getParameterAddressValue
@Nullable public static @Nullable ParameterAddressValue getParameterAddressValue(Connection connection, User user, String billingId, int contractId) throws BGException - Parameters:
connection-user-billingId-contractId-- Returns:
- null - если параметр не удалось получить
- Throws:
BGException
-
createLinkedProcess
public static Process createLinkedProcess(Connection con, int processTypeId, int linkedObjectId, String parentObjectId, String linkedObjectTitle) throws BGException - Throws:
BGException
-
linkProcess
public static void linkProcess(Connection con, int objectId, String objectType, int linkedObjectId, String linkedObjectTitle) throws BGException - Throws:
BGException
-
createProcessWithLinkedObject
public static Process createProcessWithLinkedObject(Connection con, int processTypeId, int linkedObjectId, String linkedObjectType, String linkedObjectTitle) throws BGException - Throws:
BGException
-
createProcess
- Throws:
BGException
-
copyPhonesToProcess
public static void copyPhonesToProcess(LinkAddedEvent event, Connection connection) throws BGException - Throws:
BGException
-
sendProcessCreate
public static void sendProcessCreate(int linkedObjectId, String linkedObjectType, String linkedObjectTitle, int processTypeId, String description, Map<String, Object> paramsMap) throws Exception- Throws:
Exception
-
getParamAndValueTitles
@NotNull public static @NotNull Map<String,String> getParamAndValueTitles(int processId, Connection connection) throws BGException Получение заголовков и значений параметров процесса- Throws:
BGException- в случае неудачного запроса к БД или если договор не найден
-
getHtmlTableRepresentation
@NotNull public static @NotNull String getHtmlTableRepresentation(int processId, Connection connection) throws BGException Получение табличной HTML-репрезентации процесса- Throws:
BGException- в случае неудачного запроса к БД или если договор не найден
-
getProcessTypeFromProcessId
public static ProcessType getProcessTypeFromProcessId(Connection connection, int processId) throws BGException - Throws:
BGException
-
getExecutorsTitlesWithRole
public static Set<String> getExecutorsTitlesWithRole(Connection connection, int roleParamValue, Process process, int roleId) -
copyExecutorsAndGroups
public static void copyExecutorsAndGroups(Process process, Set<Process> from, Connection connection) throws BGException - Throws:
BGException
-
getProcess
- Throws:
BGException
-
getProcess
- Throws:
BGException
-
isProcessEvent
-