Class BaseEvent<PROP_OR_INTERFACE>
- java.lang.Object
- com.iizix.api.BaseEvent<PROP_OR_INTERFACE>
 
- All Implemented Interfaces:
- IMessageBox
 - Direct Known Subclasses:
- UIBaseEvent,- VSBaseEvent
 - public abstract class BaseEvent<PROP_OR_INTERFACE> extends java.lang.Object implements IMessageBox Base event for all events in the API.- Author:
- Christopher Mindus
 
- Nested Class Summary- Nested classes/interfaces inherited from interface com.iizix.gyro.IMessageBox- IMessageBox.Icon
 
 - Field Summary- Fields - Modifier and Type - Field - Description - protected PROP_OR_INTERFACE- sourceThe property that is the source of the event.- Fields inherited from interface com.iizix.gyro.IMessageBox- ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNING
 
 - Constructor Summary- Constructors - Modifier - Constructor - Description - protected- BaseEvent(PROP_OR_INTERFACE source)Constructor called from the subclass.
 - Method Summary- All Methods Instance Methods Abstract Methods Concrete Methods - Modifier and Type - Method - Description - VSAction- getAction(@VSRef java.lang.String path)Gets the action with the specified path.- VSAction- getAction2(@FullVSRef java.lang.String fullVSRef)Gets the action with the specified full VS reference path.- VSAction- getActionNull(@VSRef java.lang.String path)Gets the action with the specified path.- VSAction- getActionNull2(@FullVSRef java.lang.String fullVSRef)Gets the action with the specified full VS reference path.- IAppSessionGyro- getAppSessionGyro()Gets the Application Session Gyro instance.- VSField- getField(@VSRef java.lang.String path)Gets the field with the specified path.- VSField- getField2(@FullVSRef java.lang.String fullVSRef)Gets the field with the specified full VS reference path.- VSField- getFieldNull(@VSRef java.lang.String path)Gets the field with the specified path.- VSField- getFieldNull2(@FullVSRef java.lang.String fullVSRef)Gets the field with the specified full VS reference path.- VSGroup- getGroup(@VSRef java.lang.String path)Gets the group with the specified path.- VSGroup- getGroup2(@FullVSRef java.lang.String fullVSRef)Gets the group with the specified full VS reference path.- VSGroup- getGroupNull(@VSRef java.lang.String path)Gets the group with the specified path.- VSGroup- getGroupNull2(@FullVSRef java.lang.String fullVSRef)Gets the group with the specified full VS reference path.- PROP_OR_INTERFACE- getSource()Gets the property that is the source of the event.- VSTable- getTable(@VSRef java.lang.String path)Gets the table with the specified path.- VSTable- getTable2(@FullVSRef java.lang.String fullVSRef)Gets the table with the specified full VS reference path.- VSTable- getTableNull(@VSRef java.lang.String path)Gets the table with the specified path.- VSTable- getTableNull2(@FullVSRef java.lang.String fullVSRef)Gets the table with the specified full VS reference path.- long- getTime()Gets the event creation time.- VirtualSpace- getVirtualizedVirtualSpace(@FullVSRef java.lang.String path)Gets a virtualized VirtualSpace for the application session.- abstract VirtualSpace- getVirtualSpace()Gets the VirtualSpace of the event source component.- <COMP extends IVSComponent>
 COMP- getVSComponent(@VSRef java.lang.String path, java.lang.Class<COMP> clazz)Gets the VS component with the specified path.- <COMP extends IVSComponent>
 COMP- getVSComponent2(@FullVSRef java.lang.String fullVSRef, java.lang.Class<COMP> clazz)Gets the VS component with the specified full reference path.- <COMP extends IVSComponent>
 COMP- getVSComponentNull(@VSRef java.lang.String path, java.lang.Class<COMP> clazz)Gets the VS component with the specified path.- <COMP extends IVSComponent>
 COMP- getVSComponentNull2(@FullVSRef java.lang.String fullVSRef, java.lang.Class<COMP> clazz)Gets the VS component with the specified full reference path.- void- messageBox(IMessageBoxReply reply, IMessageBox.Icon icon, KString title, KString message, KString... buttons)Displays a message box with the specified title and message for the application session.- protected java.lang.String- paramString()Gets the parameter string.- java.lang.String- toString()Returns a string representation of this event and its parameters and values.- Methods inherited from class java.lang.Object- clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - Methods inherited from interface com.iizix.gyro.IMessageBox- messageBox, messageBox
 
 
- Field Detail- source- protected final PROP_OR_INTERFACE source The property that is the source of the event.
 
 - Constructor Detail- BaseEvent- protected BaseEvent(PROP_OR_INTERFACE source) Constructor called from the subclass.- Throws:
- java.lang.NullPointerException- If the source is null.
 
 
 - Method Detail- getTime- public long getTime() Gets the event creation time.- Returns:
- Time in milliseconds since 1/1 1970.
- See Also:
- System.currentTimeMillis()
 
 - getSource- public PROP_OR_INTERFACE getSource() Gets the property that is the source of the event.
 - toString- public java.lang.String toString() Returns a string representation of this event and its parameters and values.- Overrides:
- toStringin class- java.lang.Object
- Returns:
- A string representation of this event.
 
 - paramString- protected java.lang.String paramString() Gets the parameter string.
 - getVirtualSpace- public abstract VirtualSpace getVirtualSpace() Gets the VirtualSpace of the event source component.- Returns:
- The VirtualSpace associated with the source component of this event.
 
 - getAppSessionGyro- public IAppSessionGyro getAppSessionGyro() Gets the Application Session Gyro instance.- Returns:
- The instance.
 
 - getField- public VSField getField(@VSRef java.lang.String path) throws NotFoundException Gets the field with the specified path.- Parameters:
- path- The path to the field in the VirtualSpace, cannot start with '/' or contain ':'.
- Returns:
- The field, never null.
- Throws:
- NotFoundException- If the field is not found.
 
 - getFieldNull- public VSField getFieldNull(@VSRef java.lang.String path) Gets the field with the specified path.- It is preferable to use - getField(String)instead of this method if the field always should be present because it will throw and log errors.- Parameters:
- path- The path to the field in the VirtualSpace, cannot start with '/' or contain ':'.
- Returns:
- The field, null if not found.
 
 - getField2- public VSField getField2(@FullVSRef java.lang.String fullVSRef) throws NotFoundException Gets the field with the specified full VS reference path.- Parameters:
- fullVSRef- The full VS reference to the field in the VirtualSpace, as "module:/vs/path".
- Returns:
- The field, never null.
- Throws:
- NotFoundException- If the field is not found.
 
 - getFieldNull2- public VSField getFieldNull2(@FullVSRef java.lang.String fullVSRef) Gets the field with the specified full VS reference path.- It is preferable to use - getField2(String)instead of this method if the field always should be present because it will throw and log errors.- Parameters:
- fullVSRef- The full VS reference to the field in the VirtualSpace, as "module:/vs/path".
- Returns:
- The field, null if not found.
 
 - getTable- public VSTable getTable(@VSRef java.lang.String path) throws NotFoundException Gets the table with the specified path.- Parameters:
- path- The path to the table in the VirtualSpace, cannot start with '/' or contain ':'.
- Returns:
- The table, never null.
- Throws:
- NotFoundException- If the table is not found.
 
 - getTableNull- public VSTable getTableNull(@VSRef java.lang.String path) Gets the table with the specified path.- It is preferable to use - getTable(String)instead of this method if the table always should be present because it will throw and log errors.- Parameters:
- path- The path to the table in the VirtualSpace, cannot start with '/' or contain ':'.
- Returns:
- The table, null if not found.
 
 - getTable2- public VSTable getTable2(@FullVSRef java.lang.String fullVSRef) throws NotFoundException Gets the table with the specified full VS reference path.- Parameters:
- fullVSRef- The full VS reference to the table in the VirtualSpace, as "module:/vs/path".
- Returns:
- The table, never null.
- Throws:
- NotFoundException- If the table is not found.
 
 - getTableNull2- public VSTable getTableNull2(@FullVSRef java.lang.String fullVSRef) Gets the table with the specified full VS reference path.- It is preferable to use - getTable2(String)instead of this method if the table always should be present because it will throw and log errors.- Parameters:
- fullVSRef- The full VS reference to the table in the VirtualSpace, as "module:/vs/path".
- Returns:
- The table, null if not found.
 
 - getAction- public VSAction getAction(@VSRef java.lang.String path) throws NotFoundException Gets the action with the specified path.- Parameters:
- path- The path to the action in the VirtualSpace, cannot start with '/' or contain ':'.
- Returns:
- The action, never null.
- Throws:
- NotFoundException- If the action is not found.
 
 - getActionNull- public VSAction getActionNull(@VSRef java.lang.String path) Gets the action with the specified path.- It is preferable to use - getAction(String)instead of this method if the action always should be present because it will throw and log errors.- Parameters:
- path- The path to the action in the VirtualSpace, cannot start with '/' or contain ':'.
- Returns:
- The action, null if not found.
 
 - getAction2- public VSAction getAction2(@FullVSRef java.lang.String fullVSRef) throws NotFoundException Gets the action with the specified full VS reference path.- Parameters:
- fullVSRef- The full VS reference to the action in the VirtualSpace, as "module:/vs/path".
- Returns:
- The action, never null.
- Throws:
- NotFoundException- If the action is not found.
 
 - getActionNull2- public VSAction getActionNull2(@FullVSRef java.lang.String fullVSRef) Gets the action with the specified full VS reference path.- It is preferable to use - getAction2(String)instead of this method if the action always should be present because it will throw and log errors.- Parameters:
- fullVSRef- The full VS reference to the action in the VirtualSpace, as "module:/vs/path".
- Returns:
- The action, null if not found.
 
 - getGroup- public VSGroup getGroup(@VSRef java.lang.String path) throws NotFoundException Gets the group with the specified path.- Parameters:
- path- The path to the group in the VirtualSpace, cannot start with '/' or contain ':'.
- Returns:
- The group, never null.
- Throws:
- NotFoundException- If the action is not found.
 
 - getGroupNull- public VSGroup getGroupNull(@VSRef java.lang.String path) Gets the group with the specified path.- It is preferable to use - getGroup(String)instead of this method if the action always should be present because it will throw and log errors.- Parameters:
- path- The path to the group in the VirtualSpace, cannot start with '/' or contain ':'.
- Returns:
- The action, null if not found.
 
 - getGroup2- public VSGroup getGroup2(@FullVSRef java.lang.String fullVSRef) throws NotFoundException Gets the group with the specified full VS reference path.- Parameters:
- fullVSRef- The full VS reference to the group in the VirtualSpace, as "module:/vs/path".
- Returns:
- The group, never null.
- Throws:
- NotFoundException- If the group is not found.
 
 - getGroupNull2- public VSGroup getGroupNull2(@FullVSRef java.lang.String fullVSRef) Gets the group with the specified full VS reference path.- It is preferable to use - getGroup2(String)instead of this method if the group always should be present because it will throw and log errors.- Parameters:
- fullVSRef- The full VS reference to the group in the VirtualSpace, as "module:/vs/path".
- Returns:
- The group, null if not found.
 
 - getVSComponent- public <COMP extends IVSComponent> COMP getVSComponent(@VSRef java.lang.String path, java.lang.Class<COMP> clazz) throws NotFoundException Gets the VS component with the specified path.- Parameters:
- path- The path to the VS component in the VirtualSpace, cannot start with '/' or contain ':'.
- clazz- The requested VS component class.
- Returns:
- The component, never null or wrong class.
- Throws:
- NotFoundException- If the field is not found or wrong class.
 
 - getVSComponentNull- public <COMP extends IVSComponent> COMP getVSComponentNull(@VSRef java.lang.String path, java.lang.Class<COMP> clazz) Gets the VS component with the specified path.- Parameters:
- path- The path to the VS component in the VirtualSpace, cannot start with '/' or contain ':'.
- clazz- The requested VS component class.
- Returns:
- The component, null if not found or wrong class.
 
 - getVSComponent2- public <COMP extends IVSComponent> COMP getVSComponent2(@FullVSRef java.lang.String fullVSRef, java.lang.Class<COMP> clazz) throws NotFoundException Gets the VS component with the specified full reference path.- Parameters:
- fullVSRef- The full reference path to the VS component in the VirtualSpace, as "module:/vs/path".
- clazz- The requested VS component class.
- Returns:
- The component, never null or wrong class.
- Throws:
- NotFoundException- If the component is not found or wrong class.
 
 - getVSComponentNull2- public <COMP extends IVSComponent> COMP getVSComponentNull2(@FullVSRef java.lang.String fullVSRef, java.lang.Class<COMP> clazz) Gets the VS component with the specified full reference path.- Parameters:
- fullVSRef- The full reference path to the VS component in the VirtualSpace, as "module:/vs/path".
- clazz- The requested VS component class.
- Returns:
- The component, null if not found or wrong class.
 
 - getVirtualizedVirtualSpace- public VirtualSpace getVirtualizedVirtualSpace(@FullVSRef java.lang.String path) Gets a virtualized VirtualSpace for the application session. The VirtualSpace to get MUST already have been virtualized prior to this call.- Parameters:
- path- The path of the VirtualSpace name relative the parent of the current VirtualSpace. This path can be e.g. just a plain name for a direct sibling of this VirtualSpace, a folder based path such as "folder/virtualSpaceB" or a full reference path as "module:/vs/[folderPath/]virtualSpace".
- Returns:
- The VirtualSpace for the path in question.
- Throws:
- NotFoundException- If the VirtualSpace is not found within the virtualized VirtualSpaces.
- java.lang.IllegalStateException- If the current VirtualSpace is disposed or the application session gyro is not found.
- java.lang.IllegalArgumentException- If path is invalid.
 
 - messageBox- public void messageBox(IMessageBoxReply reply, IMessageBox.Icon icon, KString title, KString message, KString... buttons) Displays a message box with the specified title and message for the application session. The message box will be displayed on all client sessions.- The callback is done in the application worker thread. - Specified by:
- messageBoxin interface- IMessageBox
- Parameters:
- reply- The reply callback that is called when the user chooses a button or session is closed,- nullfor none.
- icon- Icon to display, see the- {link Icon}enumeration.
- title- The title string, must be non-null.
- message- The message to display, must be non-null.
- buttons- The strings for the buttons to display, if none, just an- OKbutton is displayed. This array of buttons defined the index value returned by this method.
- Throws:
- java.lang.NullPointerException- If- iconor- messageis null, or if any of the elements in- buttonsarray is null.
- java.lang.IllegalStateException- If the application session is disposed of.