psdi.app.financial

Class FinControl

  • java.lang.Object
  • All Implemented Interfaces:
    java.rmi.Remote, FinControlRemote, MboConstants, MboRemote, MaxRemoteProxy


    public class FinControl
    extends Mbo
    implements FinControlRemote
    Mbo object to represent FinCntrl. FinControl(FinCntrl) object represents the financial entities that will primarily be imported from the external system. The financial entity will be identified by the attribute FINCNTRLID. The ability to reference this FINCNTRLID will be provided on the workorder application. All MAXIMO applications where a workorder or a GL debit account can be specified, will include the ability specify a FINCNTRLID.

    See Financial Package description.

    This is an organization/site level object.

    The key attributes for this object are OrgId and FinCntrlID.

    The attributes in this object are as follows:

    Attribute NameDescription
    ActualCostActual amount.
    AllocatedCostAllocated cost.
    AsOfDateDate last reported.
    BudgetCostBudgeted Amount.
    BudgetIDBudget Identifier.
    BudgetLineIDBudget Line Identifier.
    BudgetLineTypeBudget line type.
    BudgetTypeBudget type.
    BurdenedCostBurdened Amount.
    ChangeByThe name or user ID of the person who last modified the financial control entity.
    ChangeDateThe date and time when financial control entity was last modified.
    CommittedCostCommitted Amount.
    DescriptionDescription of the financial control entity.
    DisabledIndicates whether the financial control entity has been disabled from use.
    EndDateEffective finish date for the financial control entity.
    FCStatusStatus of the financial control entity.
    FCTypeFinancial control type.
    IsChargeAbleIndicates whether costs can be collected for this cost entity.
    IsSummaryIndicates whether this is a summary reporting cost entity.
    LDKeyLong Description Key. This is a link to text stored in the LongDescription table.
    OrgIdIdentifier of the organization for this financial control entity.
    OwnerSysIDApplication system managing the financial control entity.
    FldFinControlParentFCIDParent Financial Control Identifier.
    ParentProjectIDNon-persistent attribute which stores the parent projectid for this financial control entity.
    ParentTaskIDNon-persistent attribute which stores the parent taskid for this financial control entity.
    ProjectIDProject Identifier.
    ProjectTypeProject type.
    RemainingCostRemaining Amount.
    SenderSysID Column used by ERP-Integration (APIs).
    SiteIdIdentifier of the site for this financial control entity.
    SourceIDSource Identifier.
    SourceSysIDSouce application system for this financial control entity.
    StartDateEffective start date for the financial control entity.
    TaskIDTask Identifier.
    TaskLevelLevel from the top in a parent-child task-subtask relationship.
    TaskTypeTask type.
    TemplateIDTemplate Identifier.
    • Constructor Detail

      • FinControl

        public FinControl(MboSet ms)
                   throws java.rmi.RemoteException
        Construct the FinControl object
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException
        Initialize rountine. Set certain fields to read/only according to the mbo's state.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        This is called when a new financial control identifier is added to the FinControl MboSet collection. The field defaults and field flags are set here. The fincntrlid is auto keyed. The table below shows the default values for each of the attributes listed.
        Attribute NameAttribute Value
        actualcost0.0(zero)
        changebyCurrent username
        changedateCurrent date
        disabledNo
        fcstatusAPPR
        fctypePROJECT/TASK
        ischargeableYes
        issummaryNo
        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
        This is called whenever a change is made to the attributes of FinControl. When any field is changed, changedate and changeby is updated.
        Overrides:
        modify in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • generateAutoKey

        public void generateAutoKey()
                             throws java.rmi.RemoteException,
                                    MXException
        Financial Control supports autokeying - sets the FINCNTRLID attribute. This method is only to be called when we are enforcing autokeying the fincntrlid attribute. Only autokey if the attribute is null as it may already be autokeyed by the framework. Only allowed for newly created financial control entity.
        Specified by:
        generateAutoKey in interface MboRemote
        Overrides:
        generateAutoKey in class Mbo
        Throws:
        MXAccessException - (access, CantGenAutoKey) Cannot generate auto key.
        java.rmi.RemoteException
        MXException
        See Also:
        MboValue.autoKey(), MboValue.generateUniqueID()
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        This method will be called before the actual deletion of the mbos. A Project cannot be deleted if there are any child Projects specified for the given Project. If there are no child Projects, deleting a Project will result in all the Tasks for that Project being deleted. If a Task within a Project is deleted, the delete will not be allowed if there are any child Tasks specified for that Task. If the Task has no children, it can be deleted.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException - (financial, CannotDeleteParentProject) Cannot delete a parent project.
        MXApplicationException - (financial, CannotDeleteParentTask) Cannot delete a parent task.
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Deleting a Project will result in all the Tasks for that Project being deleted. If a Task within a Project is deleted, the delete will not be allowed if there are any child Tasks specified for that Task. If the Task has no children, it can be deleted.
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        long - accessModifier
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        This method is called by the framework before save. Checks to make sure that all required combinations of projectid and taskid are there before saving. Also checks for any duplicates.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXApplicationException - (financial, ProjectRequired) Project is required.
        MXApplicationException - (financial, TaskRequired) Task is required.
        MXApplicationException - (financial, DuplicateTask) The Task already exists.
        MXException
        java.rmi.RemoteException
      • checkChildren

        public void checkChildren(MboRemote fcMbo)
                           throws MXException,
                                  java.rmi.RemoteException
        Since cost management has a hierarchy which can be several levels deep, we have to check if any of the children's fincntrlid is the same as the parentfincntrlid which is being set. Basically we have to make sure that the parent does not exist as a child to the current Task or Project some where below in the hierarchy.
        Parameters:
        MboRemote - fcMbo The financial control mbo whose children are to be checked.
        Throws:
        MXApplicationException - (financial, CannotUseAsParent) Cannot use child as parent.
        MXException
        java.rmi.RemoteException
      • getValidateOrder

        public java.lang.String[] getValidateOrder()
        Override the system method. This method is called by the framework and returns an array of fields whose order need to be maintained during the delayed validation. This sequence is for maximizing performance for API and yielding correct result. The sequence should be: fincntrlid, fctype, parentfincntrlid, startdate, enddate, budgetid, budgetlineid, projectid, taskid, budgettype, budgetlinetype, projecttype, tasktype, parentprojectid, parenttaskid.
        Overrides:
        getValidateOrder in class Mbo
        Returns:
        String[] Array of fincontrol fields in the defined sequence.