Class Config
java.lang.Object
org.bgerp.app.cfg.Config
org.bgerp.plugin.inventoru.Config
Configuration of the Inventory plugin, including its sync1c sub-package.
Keys are stored in DB config with prefixes "inventoru:" and "sync1c:".
Not every key of the plugin lives here:
inventoru:process.showTab belongs to the
configuration of a process type (process_type.config), read straight from there by the
tab, and reading it from the global config as well would offer a second place that does not
work.
Example:
inventoru:enable=1
inventoru:processType.45.reserveStatuses=8,4,7,16
sync1c:export.maxAttempts=3
sync1c:import.alarmConsecutiveErrors=3
sync1c:processTypeIds=5,8
sync1c:processType.5.statusWriteoff=15-
Nested Class Summary
Nested classes/interfaces inherited from class Config
Config.InitStopException -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThe store a decommissioned unit goes back to and stays on, keyinventoru:device.mainStoreId; 0 — not set, a decommissioned unit stays where it is.Field names a device must have filled in before it can be saved, configurable because what counts as an identified unit differs per installation: one tracks equipment by serial, another by inventory number, a third only wants a name and a model.getReserveStatusIds(int processTypeId) Status IDs of the given process type in which reserving/unreserving materials is allowed.intImport-error streak length (per instance) that triggers an admin alarm; 0 disables.intHow many times an export to 1C is retried before it is given up on.Process types participating in the 1C write-off export.booleanhasSync1cWriteoffStatus(int processTypeId) Whether a process of this type can ever have its materials written off through 1C.booleanisSync1cWriteoffStatus(int processTypeId, int statusId) Returns true if the given statusId is the configured write-off trigger for this process type.Methods inherited from class Config
initWhen, throwValidationException
-
Constructor Details
-
Config
-
-
Method Details
-
getDeviceRequiredFields
Field names a device must have filled in before it can be saved, configurable because what counts as an identified unit differs per installation: one tracks equipment by serial, another by inventory number, a third only wants a name and a model. Keyinventoru:device.requiredFields, comma separated, names as on the form —name,deviceTypeId,equipTypeId,itemId,serialNumber,macAddress,assetTag,ip,storeId. An empty value means nothing is enforced. -
getDeviceMainStoreId
public int getDeviceMainStoreId()The store a decommissioned unit goes back to and stays on, keyinventoru:device.mainStoreId; 0 — not set, a decommissioned unit stays where it is. -
getReserveStatusIds
-
getSync1cMaxAttempts
public int getSync1cMaxAttempts()How many times an export to 1C is retried before it is given up on. -
getSync1cImportAlarmConsecutiveErrors
public int getSync1cImportAlarmConsecutiveErrors()Import-error streak length (per instance) that triggers an admin alarm; 0 disables. -
getSync1cProcessTypeIds
-
isSync1cWriteoffStatus
public boolean isSync1cWriteoffStatus(int processTypeId, int statusId) Returns true if the given statusId is the configured write-off trigger for this process type. -
hasSync1cWriteoffStatus
public boolean hasSync1cWriteoffStatus(int processTypeId) Whether a process of this type can ever have its materials written off through 1C. Without a write-off status nothing is ever enqueued, so the reserves of such a process stay until somebody removes them by hand — which the Materials tab says out loud.
-