IGridJob and IGridJobStatus so you have it for your new middleware without any line of code. But if your middleware support more information about the job, you have to contribute to "Job Details" view, what is described below.
Details on the view are grouped in sections. Currently g-Eclipse offer two implementations of single detail:
eu.geclipse.ui.views.jobdetails.IJobDetailsFactory
eu.geclipse.ui.jobDetailsFactory with the following values:
eu.geclipse.core.model.IGridJobIGridJobStatus for your middleware.IJobDetailsFactory is:
ListFor passedgetDetails( final IGridJob gridJob, final JobDetailSectionsManager sectionManager );
gridJob it should return list of IJobDetail objects. Each object provide information about one detail.For simple detail just return instance of eu.geclipse.ui.views.jobdetails.JobTextDetail.
This is an abstract class, so for every instance you have to implement method returning string representing detail value:
String getValue( final IGridJob gridJob )
For complex detail return instance of eu.geclipse.ui.views.jobdetails.JobComplexDetail. Pass into contructor id of editor, which will be opened when user click on button "Glasses". For standard text editor use id org.eclipse.ui.DefaultTextEditor.
If you would like to implement more complicated detail, then create new class extending eu.geclipse.ui.views.jobdetails.JobDetail. But in this case you have to create widgets representing the details. For examples see class eu.geclipse.glite.ui.jobdetails.LoggingEventsDetail.
IJobDetail you have to pass to the constructor section, onto which detail will be placed (object implementing IJobDetailsSection).If you want to add your detail to standard section "General" or "Application", just get object sectionManager passed in IJobDetailsFactory#getDetails and call it method: getSectionGeneral or getSectionApplication.
If you would like to place your detail on new section (specific for your middleware), just call on sectionManager:
Integer createSection( final String name, final int order )and then:
IJobDetailsSection getSection( final Integer sectionId )
Section may be created as lazy. Lazy sections are collapsed after creation (doesn't show any detail - methods JobTextDetail#getValue are not called) and during expanding they force refreshing the view. Lazy sections are useful, when values on some details have to be computed, what causes that view is refreshed much slower. Thanks of lazy section view works smoothly when section is collapsed, but user still has possibility so see all details.
IGridJobService#getJobStatus allow to download job status with different amount of data: in short version and full version. Full version is needed to show Job Details view.
Therefore view is responsible for forcing updating job status in full version. In order to avoid updating job status before every refreshing, view calls method IJobDetailsFactory#shouldUpdateJobStatus.
So details factory should decide if selected job has valid long status. If not, then view schedule status update for that job.