psdi.app.site

Class Site

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


    public class Site
    extends Mbo
    implements SiteRemote
    MBO to represent a site.

    See Site Package description.

    The key attribute for this object is: SiteId

    The attributes in this object are as follows:

    Attribute NameDescription
    ActiveBoolean flag to indicate whether or not this site object is active.
    BillToAddressCodeAddress code to be used for the default billing address.
    BillToLaborCodeLabor code to be used for the default billing contact.
    ChangeBy, ChangeDateName of the user who last modified this object and date of last change.
    DescriptionDescription of the site. Long description is enabled.
    EnterBy, EnterDateName of the user who created this site and the date it was created.
    OrgIdThe identifier of the organization to which this site is assigned.
    ShipToAddressCodeAddress code to be used for the default shipping address.
    ShipToLaborCodeLabor code to be used for the default shipping contact.
    SiteIdThe unique identifier for this site.
    • Constructor Detail

      • Site

        public Site(MboSet ms)
             throws MXException,
                    java.rmi.RemoteException
        Construct the Site object
        Parameters:
        ms - MboSet
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Adds a new Site. Required fields of the Site object are initialized.
        The table below shows the default values for each of the attributes listed.
        Attribute NameAttribute Value
        changebyCurrent username
        changedateCurrent date
        activetrue
        enterdateCurrent date
        enterbyCurrent username
        orgidParent organization ID

        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Parameters:
        none -
        Throws:
        MXApplicationException -
        GROUPKEYREASON
        siteorgNotParentThis site does not have an Organization as its parent
        MXException
        java.rmi.RemoteException
      • modify

        public void modify()
                    throws MXException,
                           java.rmi.RemoteException
        Called when a change is made to the site. When any field realated to the site is changed, changedate and changeby are updated.
        Attribute NameAttribute Value
        changebyCurrent username
        changedateCurrent date
        Overrides:
        modify in class Mbo
        Parameters:
        none -
        Throws:
        none
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        An existing site may never be deleted, will throw an exception. Only a site that has not been added may be deleted.
        Overrides:
        canDelete in class Mbo
        Parameters:
        none -
        Throws:
        MXApplicationException -
        GROUPKEYREASON
        siteattemptedToDeleteSiteAttempted to delete the site. Sites must not be deleted.
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Application validation routine called before the Site object is saved. When a Site is added the MAXVARS table is populated with site specific values. see MaxVars

        Also when adding a Site, add rows to the SiteUser table for usernames MAXIMO, DEFLT, and SYSADM.

        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        MaxVarsSet.addSiteOrgMaxvars()
      • validateOrgSite

        public void validateOrgSite(java.lang.String orgId,
                                    java.lang.String siteId)
                             throws MXException,
                                    java.rmi.RemoteException
        Validates if the specified site is within the organization
        Specified by:
        validateOrgSite in interface SiteRemote
        Parameters:
        orgid - org which need to be checked
        siteid - site which need to be checked
        Throws:
        MXApplicationException("locations", - "invalidorgsite", params)is thrown when the site is in not in the organization.
        MXException
        java.rmi.RemoteException
        See Also:
        Site.validateOrgSite(java.lang.String, java.lang.String)