Package org.openquark.samples.bam.model

Examples of org.openquark.samples.bam.model.MonitorJobDescription


            return;
        }

        // ensure all jobs are in a ready to run state
        for (int jobN = 0; jobN < document.getJobDescriptionCount (); ++jobN) {
            MonitorJobDescription jobDescription = document.getNthJobDescription (jobN);

            if (!readyToRun (jobDescription)) {
                JOptionPane.showMessageDialog (mainFrame, "The message source <"
                        + jobDescription.getMessageSourceDescription ().getName ()
                        + "> must have triggers and actions set.", "BAM Sample",
                        JOptionPane.WARNING_MESSAGE);

                return;
            }
        }
       
        // compile and start each job
        try {
            BasicCALServices calServices = getCalServices();
            for (int jobN = 0; jobN < document.getJobDescriptionCount (); ++jobN) {
                MonitorJobDescription jobDescription = document.getNthJobDescription (jobN);

                GemGraphGenerator generator = new GemGraphGenerator (calServices, jobDescription);

                //create each new job in separate modules.
                ModuleName jobModuleName = ModuleName.make(jobDescription.getJobId().toUpperCase());

                EntryPointSpec entry = calServices.addNewModuleWithFunction(jobModuleName, generator.getCalSource());

                MessageSource messageSource = MessageSourceFactory.createMessageSource (jobDescription);
                MonitorJob job = new MonitorJob (jobDescription, messageSource, entry);
View Full Code Here


    /**
     * Method onMessageListSelectionChanged
     */
    protected void onMessageListSelectionChanged () {
        MonitorJobDescription jobDescription = getSelectedJobDescription ();

        getTriggerList ().setModel (makeTriggerModel (jobDescription));
        getActionList ().setModel (makeActionModel (jobDescription));

        jobDescriptionListener.listen (jobDescription);
View Full Code Here

        DefaultListModel newModel = new DefaultListModel ();

        MonitorDocument document = app.getDocument ();

        for (int jobN = 0; jobN < document.getJobDescriptionCount (); ++jobN) {
            MonitorJobDescription jobDescription = document.getNthJobDescription (jobN);

            newModel.addElement (new MessageListItem (jobDescription));
        }

        getMessageList ().setModel (newModel);
View Full Code Here

     * Method onRemoveMessageSource
     *
     * 
     */
    protected void onRemoveMessageSource () {
        MonitorJobDescription jobDescription = getSelectedJobDescription();
       
        if (jobDescription != null) {
            if (confirmAction("Are you sure you want to delete this message source?")) {
                app.getDocument ().removeJobDescription (jobDescription);
            }
View Full Code Here

     * Method onAddTrigger
     *
     * 
     */
    protected void onAddTrigger () {
        MonitorJobDescription jobDescription = getSelectedJobDescription();
       
        if (jobDescription != null) {
            AddTriggerWizard wizard = new AddTriggerWizard (JOptionPane.getFrameForComponent(this), app, jobDescription);
           
            wizard.doModal();
View Full Code Here

     * Method onEditTrigger
     *
     *
     */
    protected void onEditTrigger () {
        MonitorJobDescription jobDescription = getSelectedJobDescription ();

        if (jobDescription != null) {
            TriggerDescription triggerDescription = getSelectedTriggerDescription ();

            if (triggerDescription != null) {
View Full Code Here

     * Method onRemoveTrigger
     *
     * 
     */
    protected void onRemoveTrigger () {
        MonitorJobDescription jobDescription = getSelectedJobDescription ();

        if (jobDescription != null) {
            if (confirmAction("Are you sure you want to delete this trigger?")) {
                TriggerDescription triggerDescription = getSelectedTriggerDescription ();

                if (triggerDescription != null) {
                    jobDescription.removeTrigger (triggerDescription);
                }
            }
        }
    }
View Full Code Here

     * Method onAddAction
     *
     * 
     */
    protected void onAddAction () {
        MonitorJobDescription jobDescription = getSelectedJobDescription();
       
        if (jobDescription != null) {
            AddActionWizard wizard = new AddActionWizard (JOptionPane.getFrameForComponent(this), app, jobDescription);
           
            wizard.doModal();
View Full Code Here

     * Method onEditAction
     *
     *
     */
    protected void onEditAction () {
        MonitorJobDescription jobDescription = getSelectedJobDescription ();

        if (jobDescription != null) {
            ActionDescription actionDescription = getSelectedActionDescription ();

            if (actionDescription != null) {
View Full Code Here

     * Method onRemoveAction
     *
     * 
     */
    protected void onRemoveAction () {
        MonitorJobDescription jobDescription = getSelectedJobDescription ();

        if (jobDescription != null) {
            if (confirmAction("Are you sure you want to delete this action?")) {
                ActionDescription actionDescription = getSelectedActionDescription ();
   
                if (actionDescription != null) {
                    jobDescription.removeAction (actionDescription);
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.openquark.samples.bam.model.MonitorJobDescription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.