Class AdminSyncAction
java.lang.Object
org.apache.struts.action.Action
org.apache.struts.actions.BaseAction
org.apache.struts.actions.DispatchAction
org.bgerp.action.base.BaseAction
org.bgerp.plugin.inventory.sync1c.action.AdminSyncAction
Admin UI for sync1c plugin.
Manages 1C instances, engineer-warehouse mappings, import log.
-
Field Summary
Fields inherited from class BaseAction
l, PATH_JSP_ADMIN, PATH_JSP_OPEN, PATH_JSP_USER, PATH_JSP_USERMOB, setupFields inherited from class org.apache.struts.actions.DispatchAction
clazz, methods, typesFields inherited from class org.apache.struts.actions.BaseAction
messagesFields inherited from class org.apache.struts.action.Action
servlet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.struts.action.ActionForwardcreate(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwarddelete(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardexportLog(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardexportQueue(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardexportQueueConfirm(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardexportQueueConfirmAll(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardexportQueueDelete(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardexportQueueDownload(DynActionForm form, ConnectionSet conSet) Streams a CSV of all pending export queue entries for the instance — one row per write-off item, so the admin/warehouse keeper can enter them into 1C by hand.org.apache.struts.action.ActionForwardexportQueueRetry(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardimportApply(DynActionForm form, ConnectionSet conSet) Defense-in-depth: this admin action normally implies full "instance:null" access (so getAccessRestriction() returns null/unrestricted for whoever holds it), but importApply/ importApplyAll/importReject/exportQueue* are independently grantable in action.xml sitting in the same "Ожидающие поступления"/"Очередь экспорта" submenus a scoped "кладовщик" permset would otherwise only get the importFile methods and import_pending for — a plausible permset-configuration mistake.org.apache.struts.action.ActionForwardimportApplyAll(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardimportFileConfirm(DynActionForm form, ConnectionSet conSet) Applies the reviewed/edited rows: resolves or creates the engineer-warehouse mapping for the picked store, upserts items, writes to import_pending — same confirm queue the store owner always used, just without requiring the mapping to pre-exist.org.apache.struts.action.ActionForwardimportFileForm(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardimportFilePreview(DynActionForm form, ConnectionSet conSet) Parses the uploaded CSV (read-only, no DB writes) and resolves each row against existing items by ext_id, so the admin can review matches/new-item-creations before confirming.org.apache.struts.action.ActionForwardimportLog(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardimportNow(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardimportPending(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardimportReject(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardmappingCreate(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardmappingDelete(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardmappingList(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardmappingUpdate(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardtestConnection(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardunspecified(DynActionForm form, ConnectionSet conSet) Default action method if no parameter 'action' passed.org.apache.struts.action.ActionForwardupdate(DynActionForm form, ConnectionSet conSet) Methods inherited from class BaseAction
checkModified, dispatchMethod, getParameter, html, html, json, json, permissionCheck, restoreRequestParams, unspecified, updatePersonalizationMethods inherited from class org.apache.struts.actions.DispatchAction
cancelled, execute, getMethod, getMethodName, unspecifiedMethods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
-
Constructor Details
-
AdminSyncAction
public AdminSyncAction()
-
-
Method Details
-
unspecified
public org.apache.struts.action.ActionForward unspecified(DynActionForm form, ConnectionSet conSet) throws Exception Description copied from class:BaseActionDefault action method if no parameter 'action' passed. Overwrite and implement.- Overrides:
unspecifiedin classBaseAction- Parameters:
form-conSet-- Returns:
- Throws:
Exception
-
create
public org.apache.struts.action.ActionForward create(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
update
public org.apache.struts.action.ActionForward update(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
delete
public org.apache.struts.action.ActionForward delete(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
testConnection
public org.apache.struts.action.ActionForward testConnection(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
mappingList
public org.apache.struts.action.ActionForward mappingList(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
mappingCreate
public org.apache.struts.action.ActionForward mappingCreate(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
mappingUpdate
public org.apache.struts.action.ActionForward mappingUpdate(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
mappingDelete
public org.apache.struts.action.ActionForward mappingDelete(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
importNow
public org.apache.struts.action.ActionForward importNow(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
importFileForm
public org.apache.struts.action.ActionForward importFileForm(DynActionForm form, ConnectionSet conSet) throws Exception - Parameters:
storeId- optional — pre-selects the store when opened from a store's own page or the movement list (0 = let the admin pick from the full list).userTier- optional — set when opened from the user-facing store card (as opposed to the admin store page), so the post-confirm redirect goes to the user-tier "Ожидающие поступления" page instead of the admin one (a scoped "кладовщик" user has no access to the admin sync1c section at all, only to this upload flow).- Throws:
Exception
-
importFilePreview
public org.apache.struts.action.ActionForward importFilePreview(DynActionForm form, ConnectionSet conSet) throws Exception Parses the uploaded CSV (read-only, no DB writes) and resolves each row against existing items by ext_id, so the admin can review matches/new-item-creations before confirming.- Throws:
Exception
-
importFileConfirm
public org.apache.struts.action.ActionForward importFileConfirm(DynActionForm form, ConnectionSet conSet) throws Exception Applies the reviewed/edited rows: resolves or creates the engineer-warehouse mapping for the picked store, upserts items, writes to import_pending — same confirm queue the store owner always used, just without requiring the mapping to pre-exist.- Throws:
Exception
-
importPending
public org.apache.struts.action.ActionForward importPending(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
importApply
public org.apache.struts.action.ActionForward importApply(DynActionForm form, ConnectionSet conSet) throws Exception Defense-in-depth: this admin action normally implies full "instance:null" access (so getAccessRestriction() returns null/unrestricted for whoever holds it), but importApply/ importApplyAll/importReject/exportQueue* are independently grantable in action.xml sitting in the same "Ожидающие поступления"/"Очередь экспорта" submenus a scoped "кладовщик" permset would otherwise only get the importFile methods and import_pending for — a plausible permset-configuration mistake. Checked the same way UserImportPendingAction checks its own apply/reject.- Throws:
Exception
-
importApplyAll
public org.apache.struts.action.ActionForward importApplyAll(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
importReject
public org.apache.struts.action.ActionForward importReject(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
importLog
public org.apache.struts.action.ActionForward importLog(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
exportQueue
public org.apache.struts.action.ActionForward exportQueue(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
exportLog
public org.apache.struts.action.ActionForward exportLog(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
exportQueueRetry
public org.apache.struts.action.ActionForward exportQueueRetry(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
exportQueueDelete
public org.apache.struts.action.ActionForward exportQueueDelete(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
exportQueueDownload
public org.apache.struts.action.ActionForward exportQueueDownload(DynActionForm form, ConnectionSet conSet) throws Exception Streams a CSV of all pending export queue entries for the instance — one row per write-off item, so the admin/warehouse keeper can enter them into 1C by hand. Writes directly to the HTTP response and returns null, same pattern as WorkAction.callboardGetTabel.- Throws:
Exception
-
exportQueueConfirm
public org.apache.struts.action.ActionForward exportQueueConfirm(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
exportQueueConfirmAll
public org.apache.struts.action.ActionForward exportQueueConfirmAll(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-