Package com.storedobject.core
Class UIAction
java.lang.Object
com.storedobject.core.StoredObject
com.storedobject.core.UIAction
- All Implemented Interfaces:
Displayable,StringFiller,HasId
A class representing a user interface action. This class extends
StoredObject
and is designed to manage actions within a UI system. It provides functionality
to define actions, manage descriptions, and handle persistence via columns and indices.
Actions are uniquely identified by their action property, and utility
methods are provided for retrieving and listing actions.
This class enforces restrictions on the action property to ensure valid data and
prevent duplicates.- Author:
- Syam
-
Field Summary
Fields inherited from class com.storedobject.core.StoredObject
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic UIActionRetrieves a UIAction based on the given action name.Retrieves the action value associated with this UIAction instance.Retrieves the description associated with this UIAction.static UIActiongetForAction(String action) Returns a UIAction corresponding to the specified action string.Gets the unique index condition of this object.static inthints()static voidstatic ObjectIterator<UIAction> Retrieves an iterator of UIAction objects whose 'Action' property matches the specified action code pattern.voidSets the action for the current object.voidsetDescription(String description) Sets the description for this UIAction.Constructs a displayable string representation of the UIAction, combining the action and description fields.toString()Provides a string representation of the UIAction object by returning its action field.voidValidates the data for the current UIAction instance.Methods inherited from class com.storedobject.core.StoredObject
addLink, addLink, addLink, addLink, addLink, addLink, addLink, addLink, checkCurrency, checkCurrency, checkForDuplicate, checkForDuplicate, checkTimeZone, checkTransaction, clearObjectLinks, contemporary, copy, copy, count, count, count, count, count, count, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, create, created, delete, delete, delete, deleted, directUpdate, equals, exists, exists, exists, exists, exists, existsFileData, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsMaster, existsMaster, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, family, family, family, family, fill, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getActor, getAttachment, getAttachmentId, getChildren, getContemporaryOf, getDeleted, getDeleted, getExistsCondition, getExistsCondition, getFileData, getFileData, getHistorical, getId, getKeyIndex, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getNotExistsCondition, getNotExistsCondition, getParent, getParent, getParent, getParentId, getParentId, getParentId, getRelated, getRelated, getTransaction, getTransactionId, getTransactionIP, getUnique, hashCode, inserted, isModified, isVirtual, list, list, list, list, list, list, list, list, list, list, list, list, list, listDeletedIds, listFileData, listFileData, listHistory, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listTree, listTree, listTree, listTree, listViaQuery, listViaQuery, load, load, load, load, loadAttributesFrom, loaded, loading, makeNew, makeVirtual, migrate, moduleName, nextVersion, objectLink, objectLink, objectLink, objectLinks, objectLinks, old, person, previousVersion, previousVersion, query, query, query, query, query, query, query, query, query, query, query, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, reload, reload, reloaded, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeReverseLinks, removeReverseLinks, save, save, save, save, save, save, save, save, save, save, save, save, save, save, save, saved, saving, setMaster, setRawValue, setTransaction, stringify, tableName, timestamp, toCode, transacting, undelete, undelete, undeleted, updated, user, userId, validate, validateChildAttach, validateChildDetach, validateChildUpdate, validateDelete, validateInsert, validateParentAttach, validateParentDetach, validateParentUpdate, validateUndelete, validateUpdate, valueEquals
-
Constructor Details
-
UIAction
public UIAction()Default constructor for the UIAction class.
-
-
Method Details
-
columns
-
indices
-
getUniqueCondition
Description copied from class:StoredObjectGets the unique index condition of this object.- Overrides:
getUniqueConditionin classStoredObject- Returns:
- Unique index condition.
-
hints
public static int hints() -
setAction
Sets the action for the current object. This method assigns a new value to the action property, but it ensures that the operation is only performed when loading is allowed. If loading is not allowed, it throws a Set_Not_Allowed exception.- Parameters:
action- the new action to be set for the object- Throws:
Set_Not_Allowed- if the action setting is not allowed due to the loading state
-
getAction
Retrieves the action value associated with this UIAction instance.- Returns:
- The action value as a String.
-
setDescription
Sets the description for this UIAction.- Parameters:
description- the description to be assigned to this UIAction
-
getDescription
-
validateData
Validates the data for the current UIAction instance. Performs checks on the 'action' field to ensure it is not empty or invalid, converts it to its code representation, and verifies there are no duplicate entries.- Overrides:
validateDatain classStoredObject- Parameters:
tm- TheTransactionManagerinstance used to handle the transaction context.- Throws:
Exception- If validation fails due to invalid or duplicate data.
-
toString
Provides a string representation of the UIAction object by returning its action field.- Overrides:
toStringin classStoredObject- Returns:
- the action field as a string representation of the object
-
toDisplay
Constructs a displayable string representation of the UIAction, combining the action and description fields.- Specified by:
toDisplayin interfaceDisplayable- Overrides:
toDisplayin classStoredObject- Returns:
- A string combining the action and description separated by a space.
-
getForAction
-
get
-
list
Retrieves an iterator of UIAction objects whose 'Action' property matches the specified action code pattern.- Parameters:
action- the action code pattern to filter the results. This pattern is transformed into a format suitable for querying.- Returns:
- an ObjectIterator of UIAction objects that match the specified action pattern.
-