psdi.app.doclink

Class Docinfo

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


    public class Docinfo
    extends Mbo
    implements DocinfoRemote
    Mbo object to represent Docinfo.

    This mbo contains non-persistent attributes.

    See Doclink Package description.

    This is a site level object.

    The key attributes for this object are SiteID and Document.
    The secondary unique key is by SiteID, UrlName, UrlParam1, UrlParam2, UrlParam3, UrlParam4, and UrlParam5.

    The attributes in this object are as follows:

    Attribute NameDescription
    AppNon-persistent attribute for application name. The UI can provide a value for App, and the value of "app" will be used by the object for validating doctype. See MaxApps.
    ApplicationThe application used to open the file for reading. Used by Centura only.
    DescriptionFreeform description. Also accommodates a long description.
    DMSNameForeign key to DmsApiSetting. Used for DMS urltype only.
    DocLocationFreeform user-defined information.
    DocTypeForeign key to Doctypes.
    DocumentUnique identifier for this object, within site.
    NewUrlNameNon-persistent attribute. This value is set by the UI when adding a mbo and "upload" is True. When saving the mbo, the docinfo.urlname is set equal to the newurlname.
    OrgIDThe organization for this site, stored on this table for ease of access. This equals the value for OrgID specified on the Site table.
    PrintThruLinkDfltUsed as a default value when creating Doclinks PrintThruLink.
    RevisionFreeform user-defined information.
    ShowTrue to show this docinfo on the Register Documents and the Add/Modify Doclinks screens; False to hide it.
    SiteIDThe site to which this record pertains. Foreign key to Site.
    Status, StatusDate, CreateBy, CreateDate, ChangeBy, ChangeDateself-explanatory.
    UploadNon-persistent attribute. If urltype is FILE, this attribute identifies whether the document should be uploaded to the network when creating a new Docinfo record.
    UrlNameIf urltype is FILE, this is a filename. If urltype is WWW, this is an internet url.
    UrlParam1 thru UrlParam5Additional parameters to use when opening the file via an Application or DMS. Used by Centura only.
    UrlType
    • FILE indicates that this document is accessible from a file server. Urltype FILE can also be accessible via the Internet if conversion parameters have been defined. See getDocumentURL.
    • WWW indicates that this document is accessible via the Internet.
    • DMS indicates that this document is accessible via a document management system.
    UseDefaultFilePathObsolete.
    WebUrlNon-persistent attribute used by the UI for displaying the document. See calcWebUrl.
    See Also:
    Doctypes, Doclinks
    • Method Detail

      • init

        public void init()
                  throws MXException
        Set readonly flags for various attributes.
        Overrides:
        init in class Mbo
        Throws:
        MXException
        See Also:
        psdi.app.doclink.DoclinkService#calcWebUrl
      • add

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

        public void modify()
                    throws MXException,
                           java.rmi.RemoteException
        Prepare to modify a mbo, defaulting the attributes shown below.
        Attribute NameAttribute Value
        ChangeByCurrent user
        ChangeDateCurrent date
        Overrides:
        modify in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getValidateOrder

        public java.lang.String[] getValidateOrder()
        Validate Order for Docinfo attributes. Urltype is first.
        Overrides:
        getValidateOrder in class Mbo
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Can delete only if no doclinks exist.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidateUpload

        public void appValidateUpload()
                               throws MXException,
                                      java.rmi.RemoteException
        Called from appValidate when "upload" is True.

        1. If "description" is null, set "description" equal to "urlname".
        2. Set "urlname" equal to "newurlname".
        3. Set "weburl" equal to value from calcWebUrl.
        Throws:
        MXException
        java.rmi.RemoteException
      • addDocinfoAndLinks

        public void addDocinfoAndLinks(java.lang.String urlname,
                                       java.lang.String description,
                                       java.lang.String[] urlparam,
                                       java.lang.String doctype,
                                       java.lang.String urltype,
                                       java.lang.String keytable,
                                       java.lang.String keycolumn,
                                       java.lang.String[] keyvalue,
                                       boolean forceAutokey,
                                       java.lang.String application)
                                throws MXException,
                                       java.rmi.RemoteException
        This method sets values on this Mbo, calls Validate, then calls addDoclinks. If you are using this method, it should be called immediately after the add().
        Specified by:
        addDocinfoAndLinks in interface DocinfoRemote
        Parameters:
        urlname - Value for docinfo urlname. Required.
        description - Value for docinfo description.
        urlparam - Value for docinfo urlparam(1-5). Can be null.
        doctype - Value for docinfo doctype. Required.
        urltype - Value for docinfo urltype. Required.
        keytable - Value for doclinks keytable. If null, then no links are added.
        keycolumn - Value for doclinks keytable. If null, then no links are added.
        keyvalue - Array of values for doclinks keyvalue. If null, then no links are added. It is important to note that the values stored in this array must not include locale-specific formatting (i.e. if the keyvalue is numeric then the value supplied must not contain commas).
        forceAutokey - If the docinfo document is not automatically, and this parameter is True, then this method will force autokeying for the "document" attribute. Otherwise, autokeying depends on the framework, as usual.
        application - The value of "application" attribute on docinfo. Generally this should be null.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Docinfo.addDoclinks(java.lang.String, java.lang.String, java.lang.String, java.lang.String[])
      • addDoclinks

        public void addDoclinks(java.lang.String doctype,
                                java.lang.String keytable,
                                java.lang.String keycolumn,
                                java.lang.String[] keyvalue)
                         throws MXException,
                                java.rmi.RemoteException
        Add doclinks to this mbo. Called from addDocinfoAndLinks. If a link already exists, then it is bypassed without error; only the new links are added. If the link is added, the Validate method is called for the link.
        Specified by:
        addDoclinks in interface DocinfoRemote
        Parameters:
        doctype - Value for doclinks doctype. If null, will equal docinfo doctype.
        keytable - Value for doclinks keytable. If null, then no links are added.
        keycolumn - Value for doclinks keytable. If null, then no links are added.
        keyvalue - Array of values for doclinks keyvalue. If null, then no links are added. It is important to note that the values stored in this array must not include locale-specific formatting (i.e. if the keyvalue is numeric then the value supplied must not contain commas).
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Docinfo.addDoclinks(java.lang.String, java.lang.String, java.lang.String, java.lang.String[])