psdi.app.signature

Class Bookmark

  • All Implemented Interfaces:
    java.rmi.Remote, BookmarkRemote, MboConstants, MboRemote, MaxRemoteProxy


    public class Bookmark
    extends Mbo
    implements BookmarkRemote
    Mbo object to represent Bookmark. The bookmark is for a userid, app, and keyvalue. The implicit keytable is maxapps.maintbname and the keycolumn is maxapps.keycolumn. There are no field validations because it is assumed that a user will be bookmarking a Mbo that is actually being viewed in an application.

    See Signature Package description.

    This object contains non-persistent attributes.

    This is a site level object.

    The key attributes for this object are SiteID, UserID, App, and KeyValue.

    The attributes in this object are as follows:

    Attribute NameDescription
    AppThe application to which this bookmark applies. Foreign key to MaxApps.
    DescriptionNon-persistent attribute. The description from the Mbo identified by KeyValue. For example, if this is a bookmark for Equipment, this is the Equipment's description. If the key Mbo does not have a "description" attribute, then this will be the value of the "name" attribute. If the key Mbo does not have a "description" or "name" attribute, then this will be null.
    EnterDateThe date the bookmark was created.
    KeyValueTogether with the table name (maxapps.maintbname) and column name (maxapps.keycolumn), this identifies the particular row in that table that is accessed via this bookmark.

    It is important to note that the value stored in KeyValue must not include locale-specific formatting. This value would be retrieved from the key Mbo by something like the following:
    (mbo.getMboValueData(attributeName)).getDataAsObject()).toString()

    OwnerKeyNon-persistent attribute. Value of the external key field in the owner Mbo. For example, KeyValue might equal 29 but OwnerKey might equal WILSON.
    UserIDThe user who created and can use this bookmark. Foreign key to MaxUser.
    • Constructor Detail

      • Bookmark

        public Bookmark(MboSet ms)
                 throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException
        Description copied from class: Mbo
        Called by the framework when the Mbo has been constructed and the MboValues have been initialized. This can be overridden by the programmer to provide any custom initialization they would like to do.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add a mbo, defaulting the attributes shown below.
        Attribute NameAttribute Value
        Appvalue of getApp
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Must be the bookmark owner to delete.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getKeyMbo

        public MboRemote getKeyMbo()
                            throws MXException,
                                   java.rmi.RemoteException
        Get the bookmarked mbo. For example, if this bookmark is linked to workorder where wonum = '1234', then this method returns the MboRemote of workorder 1234.
        Specified by:
        getKeyMbo in interface BookmarkRemote
        Returns:
        the bookmarked Mbo. If the bookmarked mbo is not found, then this returns null.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Bookmark.getKeyMboSet()
      • getKeyDescription

        public java.lang.String getKeyDescription()
                                           throws MXException,
                                                  java.rmi.RemoteException
        Get the description of the bookmarked mbo. For example, if this bookmark is linked to workorder where wonum = '1234', then this method returns the description of workorder 1234.
        Specified by:
        getKeyDescription in interface BookmarkRemote
        Returns:
        the description of the bookmarked Mbo. If the bookmarked mbo is not found, then this returns null. If the mbo does not contain a description attribute, it will return the name attribute. If there is no name, then this returns null.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Bookmark.getKeyMboSet()