psdi.app.ticket

Class TKTemplate

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


    public class TKTemplate
    extends StatefulMbo
    implements TKTemplateRemote
    MBO to represent a Ticket Template. See the Ticket package description for details.

    This is a system level object.

    The key attribute for this object is TemplateId.

    The attributes in this object are as follows:

    Attribute NameDescription
    ClassClassification of Ticket that can be either a Service Request, Problem or Incident.
    ClassstructureidDefines the class structure of the Ticket.
    CommodityCommodity.
    CommoditygroupCommodity Group.
    DescriptionDescription of the Ticket.
    Description_LongDescriptionLong Description of the Ticket.
    ImpactSpecifies the business Impact/severity of the Ticket
    InternalPriorityAttribute that indicates the Priority of an Issue as determined by the Servoce Desk Agent
    OwnerAttribute that identifies the Owner for the ticket.
    OwnerGroupAttribute that identifies the Owner group for the ticket.
    StatusThe status of the Ticket Template.
    StatusDateTicket Template's Status Date.
    TemplateIdAttribute that identifies Template Identifier.
    TKTemplateIdUnique identifier of the template Template.
    UrgencyAttribute that identifies reflection of the speed in which a Ticket should be resolved.
    VendorThe Company associated with the ticket.

    • Field Detail

      • mbv

        public MboValue mbv
        Define the MboValue mbv to be utilized by the getHierarchyPath method.
    • Constructor Detail

      • TKTemplate

        public TKTemplate(MboSet ms)
                   throws MXException,
                          java.rmi.RemoteException
        Constructs the Ticket Template object.
        Parameters:
        ms - the Ticket Template MboSet.
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add a new Ticket Template. When a new ticket template is added, the following attributes are set to the default values.
        status is set to 'DRAFT'
        statusdate is set to the current system date
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        protected void save()
                     throws MXException,
                            java.rmi.RemoteException
        Description copied from class: StatefulMbo
        Overrides the save of Mbo so that a row is added to the status history table when a new object is saved.
        Overrides:
        save in class StatefulMbo
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Description copied from class: Mbo
        Pre-save validation method. Programmer can override with specific rules.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • duplicate

        public MboRemote duplicate()
                            throws MXException,
                                   java.rmi.RemoteException
        Duplicates a Ticket Template record.
        Specified by:
        duplicate in interface MboRemote
        Overrides:
        duplicate in class Mbo
        Returns:
        MboRemote The newly created Ticket Template mbo.
        Throws:
        MXException
        java.rmi.RemoteException
      • copyRelationshipMboSet

        protected void copyRelationshipMboSet(MboRemote targetMbo,
                                              java.lang.String relationshipName)
                                       throws java.rmi.RemoteException,
                                              MXException
        Given a target MBO and the relationship name, copy the MBOSet from this MBO relationship to the target MBO relationship with the same name. Useful when duplicating MBO relationships.
        Parameters:
        targetMbo - the mbo that will have this current relationship copied to.
        relationshipName - the name of the realtionship to be copied.
        Throws:
        java.rmi.RemoteException
        MXException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Method that deletes a Ticket Template
        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)
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws MXException,
                                        java.rmi.RemoteException
        Overrides the skipCopyField() in the Mbo. Since this method takes the MboValueInfo as its parameter just check to see if this field needs to be copied or skipped by using the data from the static HashSet. If this field does not need to be copied return true. The following are the TKTemplate fields will be skipped without being copied to the newly duplicated TKTemplate:
        1. templateid
        2. status
        3. statusdate
        Overrides:
        skipCopyField in class Mbo
        Parameters:
        mvi - The MboValueInfo object of the MboValue that needs to be copied.
        Returns:
        true If the field does not need to be copied return true, in all other cases return false.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        TKTemplate.loadSkipFieldCopyHashSet()
      • getStatusListName

        public java.lang.String getStatusListName()
        Gets the name of the value list that contains all the status's. For Ticket Templates this is TEMPLATESTATUS.
        Specified by:
        getStatusListName in interface StatefulMboRemote
        Specified by:
        getStatusListName in class StatefulMbo
        Returns:
        "TEMPLATESTATUS"
      • changeStatus

        public void changeStatus(java.lang.String status,
                                 java.util.Date date,
                                 java.lang.String memo,
                                 long accessModifier)
                          throws MXException,
                                 java.rmi.RemoteException
        Change Status A string briefly describing the circumstances of the change. The memo can be null.
        Specified by:
        changeStatus in interface StatefulMboRemote
        Overrides:
        changeStatus in class StatefulMbo
        Parameters:
        status - The new desired status. This is the translated status (that is, the status code as it would have been entered by a user, or valuelist.value), not the internal status value (valuelist.maxvalue).
        date - The effective date of the new status (java.util.Date). If null the current date/time is used.
        memo - A string briefly describing the circumstances of the change. The memo can be null.
        accessModifier -
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        StatefulMbo.canChangeStatus(String)
      • generateWO

        public void generateWO(java.lang.String ticketid,
                               java.lang.String ticketclass,
                               MboRemote tk)
                        throws MXException,
                               java.rmi.RemoteException
        Generate Work Orders (Activities)
        Specified by:
        generateWO in interface TKTemplateRemote
        Parameters:
        activitySet - A set from the tktempltactivity table where the templateid equals the template that is being applied.
        ticketid - The ticketid of the current ticket on which the template if being applied.
        ticketclass - The class of the current ticket on which the template if being applied.
        tk - The ticket mbo.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Ticket.ticketStatus()
      • setHierarchyPath

        public void setHierarchyPath(MboValue val)
                              throws java.rmi.RemoteException,
                                     MXException
        This methods sets the MboValue from the Classstructure Hierarchy Path Field Class validation. It is needed to keep track of the Classstructure mbovalule.
        Throws:
        java.rmi.RemoteException
        MXException
      • doClassificationCreate

        public void doClassificationCreate(MboRemote newMbo,
                                           MboRemote sourceMbo,
                                           java.lang.String keyAttribute)
                                    throws MXException,
                                           java.rmi.RemoteException
        08-11008: copy ticketspec to tktactivityspec to workorderspec
        Parameters:
        newMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • setByPassSortOrderValidation

        public void setByPassSortOrderValidation(java.lang.Boolean byPassSortOrderValidation)
        Parameters:
        byPassSortOrderValidation - the byPassSortOrderValidation to set