Class MRequest

    • Constructor Detail

      • MRequest

        public MRequest​(Properties ctx,
                        int R_Request_ID,
                        String trxName)
        Constructor
        Parameters:
        ctx - context
        R_Request_ID - request or 0 for new
        trxName - transaction
      • MRequest

        public MRequest​(Properties ctx,
                        int SalesRep_ID,
                        int R_RequestType_ID,
                        String Summary,
                        boolean isSelfService,
                        String trxName)
        SelfService Constructor
        Parameters:
        ctx - context
        SalesRep_ID - SalesRep
        R_RequestType_ID - request type
        Summary - summary
        isSelfService - self service
        trxName - transaction
      • MRequest

        public MRequest​(Properties ctx,
                        ResultSet rs,
                        String trxName)
        Load Constructor
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
    • Method Detail

      • getR_Request_ID

        public static int getR_Request_ID​(String mailText)
        Get Request ID from mail text
        Parameters:
        mailText - mail text
        Returns:
        ID if it contains request tag otherwise 0
      • setR_RequestType_ID

        public void setR_RequestType_ID()
        Set Default Request Type.
      • setR_Status_ID

        public void setR_Status_ID()
        Set Default Request Status.
      • addToResult

        public void addToResult​(String Result)
        Add To Result
        Parameters:
        Result -
      • setDueType

        public void setDueType()
        Set DueType based on Date Next Action
      • getActions

        public MRequestAction[] getActions()
        Get Action History
        Returns:
        array of actions
      • getUpdates

        public MRequestUpdate[] getUpdates​(String confidentialType)
        Get Updates
        Parameters:
        confidentialType - maximum confidential type - null = all
        Returns:
        updates
      • getUpdatesPublic

        public MRequestUpdate[] getUpdatesPublic()
        Get Public Updates
        Returns:
        public updates
      • getUpdatesCustomer

        public MRequestUpdate[] getUpdatesCustomer()
        Get Customer Updates
        Returns:
        customer updates
      • getUpdatesInternal

        public MRequestUpdate[] getUpdatesInternal()
        Get Internal Updates
        Returns:
        internal updates
      • getRequestType

        public MRequestType getRequestType()
        Get Request Type
        Returns:
        Request Type
      • getRequestTypeName

        public String getRequestTypeName()
        Get Request Type Text (for jsp)
        Returns:
        Request Type Text
      • getCategory

        public MRequestCategory getCategory()
        Get Request Category
        Returns:
        category
      • getCategoryName

        public String getCategoryName()
        Get Request Category Name
        Returns:
        name
      • getGroup

        public MGroup getGroup()
        Get Request Group
        Returns:
        group
      • getGroupName

        public String getGroupName()
        Get Request Group Name
        Returns:
        name
      • getStatus

        public MStatus getStatus()
        Get Status
        Returns:
        status
      • getStatusName

        public String getStatusName()
        Get Request Status Name
        Returns:
        name
      • getResolution

        public MResolution getResolution()
        Get Request Resolution
        Returns:
        resolution
      • getResolutionName

        public String getResolutionName()
        Get Request Resolution Name
        Returns:
        name
      • isOverdue

        public boolean isOverdue()
        Is Overdue
        Returns:
        true if overdue
      • isDue

        public boolean isDue()
        Is due
        Returns:
        true if due
      • getDueTypeText

        public String getDueTypeText()
        Get DueType Text (for jsp)
        Returns:
        text
      • getPriorityText

        public String getPriorityText()
        Get Priority Text (for jsp)
        Returns:
        text
      • getPriorityUserText

        public String getPriorityUserText()
        Get Importance Text (for jsp)
        Returns:
        text
      • getConfidentialText

        public String getConfidentialText()
        Get Confidential Text (for jsp)
        Returns:
        text
      • getConfidentialEntryText

        public String getConfidentialEntryText()
        Get Confidential Entry Text (for jsp)
        Returns:
        text
      • setDateLastAlert

        public void setDateLastAlert()
        Set Date Last Alert to today
      • getSalesRepName

        public String getSalesRepName()
        Get Sales Rep Name
        Returns:
        Sales Rep User
      • getCreatedByName

        public String getCreatedByName()
        Get Name of creator
        Returns:
        name
      • getUser

        public MUser getUser()
        Get Contact (may be not defined)
        Returns:
        Sales Rep User
      • getBPartner

        public MBPartner getBPartner()
        Get BPartner (may be not defined)
        Returns:
        Sales Rep User
      • isWebCanUpdate

        public boolean isWebCanUpdate()
        Web Can Update Request
        Returns:
        true if Web can update
      • webUpdate

        public boolean webUpdate​(String result)
        Web Update
        Parameters:
        result - result
        Returns:
        true if updated
      • createPDF

        public File createPDF()
        Create PDF
        Returns:
        pdf or null
      • createPDF

        public File createPDF​(File file)
        Create PDF file
        Parameters:
        file - output file
        Returns:
        file if success
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Before Save
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new
        Returns:
        true
      • afterSave

        protected boolean afterSave​(boolean newRecord,
                                    boolean success)
        After Save
        Overrides:
        afterSave in class PO
        Parameters:
        newRecord - new
        success - success
        Returns:
        success
      • getMailTag

        public String getMailTag()
        Get Mail Tag
        Returns:
        [Req@{id}@]
      • doClose

        public void doClose()
        (Soft) Close request. Must be called after webUpdate
      • doEscalate

        public void doEscalate​(boolean user)
        Escalate request
        Parameters:
        user - true if user escalated - otherwise system
      • isChanged

        public boolean isChanged()
      • setIsChanged

        public void setIsChanged​(boolean changed)