psdi.app.system

Class TenantReg

    • Constructor Detail

      • TenantReg

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

      • init

        public void init()
                  throws MXException
        Initialize the TenantReg object. Sets certain fields to be read only after save.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • getStatusHistory

        protected MboSetRemote getStatusHistory()
                                         throws MXException,
                                                java.rmi.RemoteException
        Return the TenantStatus object used for storing the status change history.
        Specified by:
        getStatusHistory in class StatefulMbo
        Returns:
        The set of TenantStatus records
        Throws:
        MXException
        java.rmi.RemoteException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Sets the tenantid value when a tenant is added.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Delete the tenant along with any status history.
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        accessModifier - The bitwise flag specified to determine if certain normal security checks are to be bypassed for this delete request. For example: if the accessModifer is NOACCESSCHECK, then the check for the object's NODELETE flag and the call to the object's canDelete() method will not be performed. If the accessModifer is NONE, then all the access checks are performed before this object is marked delete.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Pre-save validation method. Confirms that the mail server property is set and that the database userid is correct and can be used to switch context to the new tenant.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • resetPwd

        public boolean resetPwd()
                         throws MXException,
                                java.rmi.RemoteException
        Resets the password for the tenant contact. Auto-generates a new password, locates the User created for the tenant contact and updates it with the new password. When the User is saved, the password is emailed to the contact.
        Specified by:
        resetPwd in interface TenantRegRemote
        Returns:
        boolean true if the password was changed, false if not
        Throws:
        MXApplicationException - if the record is not yet saved.
        MXException
        java.rmi.RemoteException
      • resetTenantAdminPwd

        public boolean resetTenantAdminPwd()
                                    throws MXException,
                                           java.rmi.RemoteException
        Resets the password for the tenant contact. Auto-generates a new password, locates the User created for the tenant contact and updates it with the new password. When the User is saved, the password is emailed to the contact.
        Specified by:
        resetTenantAdminPwd in interface TenantRegRemote
        Returns:
        boolean true if the password was changed, false if not
        Throws:
        MXApplicationException - if the record is not yet saved.
        MXException
        java.rmi.RemoteException
      • getSessionCount

        public int getSessionCount(boolean active)
                            throws MXException,
                                   java.rmi.RemoteException
        Calculates the number of active or inactive sessions for this tenant.
        Parameters:
        boolean - active When true, count active sessions, when false, count inactive sessions.
        Throws:
        MXException
        java.rmi.RemoteException
      • updateSessionCounts

        public void updateSessionCounts()
                                 throws MXException,
                                        java.rmi.RemoteException
        Sets the values for the nonpersistent activesessions and inactivesessions attributes.
        Specified by:
        updateSessionCounts in interface TenantRegRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • commit

        protected void commit()
        Overrides:
        commit in class Mbo
      • setTenantInfo

        protected void setTenantInfo()
                              throws java.rmi.RemoteException,
                                     MXException
        This code will be called from tenantregListner and will insert/update row in TENANTROINFO.
        Throws:
        MXException
        java.rmi.RemoteException