<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="init" immediate="true" name="System Maintenance Service">
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="init" deactivate="destroy" immediate="true" name="System Maintenance Service">
<reference bind="setRepository" cardinality="1..1" interface="javax.jcr.Repository" name="Repository" policy="static" target="(cn=connect)"/>
<service>
<provide interface="org.argeo.connect.SystemMaintenanceService"/>
</service>
<reference bind="addAppService" cardinality="0..n" interface="org.argeo.connect.AppMaintenanceService" name="AppMaintenanceService" policy="static"/>
<implementation class="org.argeo.connect.core.DynamicSystemMaintenanceService"/>
+ <reference bind="setUserAdminService" cardinality="1..1" interface="org.argeo.connect.UserAdminService" name="UserAdminService" policy="static"/>
</scr:component>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="init" deactivate="destroy" immediate="true" name="Tracker Maintenance Service">
- <implementation class="org.argeo.tracker.core.TrackerMaintenanceService"/>
- <service>
- <provide interface="org.argeo.connect.AppMaintenanceService"/>
- </service>
- <reference bind="setRepository" cardinality="1..1" interface="javax.jcr.Repository" name="Repository" policy="static" target="(cn=connect)"/>
- <reference bind="setUserAdminService" cardinality="1..1" interface="org.argeo.connect.UserAdminService" name="UserAdminService" policy="static"/>
-</scr:component>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="Tracker Service">
- <implementation class="org.argeo.tracker.core.TrackerServiceImpl"/>
- <service>
- <provide interface="org.argeo.connect.AppService"/>
- <provide interface="org.argeo.tracker.TrackerService"/>
- </service>
- <reference bind="setActivitiesService" cardinality="1..1" interface="org.argeo.activities.ActivitiesService" name="ActivitiesService" policy="static"/>
-</scr:component>
Bundle-ActivationPolicy: lazy
Service-Component: OSGI-INF/systemAppService.xml,\
- OSGI-INF/userManagerService.xml,\
- OSGI-INF/resourcesService.xml,\
- OSGI-INF/activitiesService.xml,\
- OSGI-INF/peopleService.xml,\
- OSGI-INF/trackerService.xml,\
- OSGI-INF/documentsService.xml,\
- OSGI-INF/systemMaintenanceService.xml,\
- OSGI-INF/activitiesMaintenanceService.xml,\
- OSGI-INF/resourcesMaintenanceService.xml,\
- OSGI-INF/peopleMaintenanceService.xml,\
- OSGI-INF/trackerMaintenanceService.xml
+OSGI-INF/userManagerService.xml,\
+OSGI-INF/resourcesService.xml,\
+OSGI-INF/activitiesService.xml,\
+OSGI-INF/peopleService.xml,\
+OSGI-INF/trackerService.xml,\
+OSGI-INF/documentsService.xml,\
+OSGI-INF/systemMaintenanceService.xml,\
+OSGI-INF/activitiesMaintenanceService.xml,\
+OSGI-INF/resourcesMaintenanceService.xml,\
+OSGI-INF/peopleMaintenanceService.xml
Import-Package: javax.jcr,\
javax.transaction,\
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="Tracker E4 Service">
- <implementation class="org.argeo.tracker.e4.TrackerE4Service"/>
- <service>
- <provide interface="org.argeo.connect.e4.AppE4Service"/>
- <provide interface="org.argeo.connect.ui.AppWorkbenchService"/>
- </service>
- <property name="service.ranking" type="Integer" value="10"/>
- <reference bind="setActivitiesService" cardinality="1..1" interface="org.argeo.activities.ActivitiesService" name="ActivitiesService" policy="static"/>
- <reference bind="setUserAdminService" cardinality="1..1" interface="org.argeo.connect.UserAdminService" name="UserAdminService" policy="static"/>
- <reference bind="setTrackerService" cardinality="1..1" interface="org.argeo.tracker.TrackerService" name="TrackerService" policy="static"/>
-</scr:component>
OSGI-INF/resourcesE4Service.xml,\
OSGI-INF/activitiesE4Service.xml,\
OSGI-INF/peopleE4Service.xml,\
-OSGI-INF/trackerE4Service.xml,\
OSGI-INF/documentsE4Service.xml
Import-Package: org.eclipse.swt,\
org.argeo.people.e4,\
org.argeo.people.e4.handlers,\
org.argeo.documents.e4,\
-org.argeo.tracker.e4,\
org.argeo.connect.e4.resources,\
*
import javax.inject.Inject;
import javax.jcr.Node;
import javax.jcr.Repository;
-import javax.jcr.RepositoryException;
import javax.jcr.Session;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.argeo.cms.ui.eclipse.forms.FormToolkit;
import org.argeo.cms.util.CmsUtils;
import org.argeo.connect.SystemAppService;
/** Generic dashboard for Argeo Suite applications */
public abstract class AbstractSuiteDashboard {
- private final static Log log = LogFactory.getLog(AbstractSuiteDashboard.class);
+ // private final static Log log =
+ // LogFactory.getLog(AbstractSuiteDashboard.class);
// DEPENDENCY INJECTION
@Inject
}
/* DEPENDENCY INJECTION */
- public void setRepository(Repository repository) {
- this.repository = repository;
- }
-
- public void setResourcesService(ResourcesService resourcesService) {
- this.resourcesService = resourcesService;
- }
-
- public void setSystemAppService(SystemAppService systemAppService) {
- this.systemAppService = systemAppService;
- }
-
- public void setSystemWorkbenchService(SystemWorkbenchService systemWorkbenchService) {
- this.systemWorkbenchService = systemWorkbenchService;
- }
+ // public void setRepository(Repository repository) {
+ // this.repository = repository;
+ // }
+ //
+ // public void setResourcesService(ResourcesService resourcesService) {
+ // this.resourcesService = resourcesService;
+ // }
+ //
+ // public void setSystemAppService(SystemAppService systemAppService) {
+ // this.systemAppService = systemAppService;
+ // }
+ //
+ // public void setSystemWorkbenchService(SystemWorkbenchService
+ // systemWorkbenchService) {
+ // this.systemWorkbenchService = systemWorkbenchService;
+ // }
}
import org.argeo.tracker.core.TrackerUtils;
import org.argeo.tracker.ui.TaskListLabelProvider;
import org.argeo.tracker.ui.TaskVirtualListComposite;
-import org.eclipse.e4.ui.di.Focus;
+import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.jface.viewers.ColumnLabelProvider;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
@Inject
private ActivitiesService activitiesService;
+
@Inject
+ @Optional
private TrackerService trackerService;
private String datePattern = "dd MMM yyyy";
// noTaskLbl.setLayoutData(new GridData(SWT.CENTER, SWT.BOTTOM, true, true));
} else {
- TaskListLabelProvider labelProvider = new TaskListLabelProvider(trackerService);
+ TaskListLabelProvider labelProvider = new TaskListLabelProvider(getSystemAppService());
tvlc = new TaskVirtualListComposite(parent, SWT.NO_FOCUS, (ILabelProvider) labelProvider, 54);
tvlc.setLayoutData(EclipseUiUtils.fillAll());
final TableViewer viewer = tvlc.getTableViewer();
}
}
- nit = trackerService.getMyMilestones(getSession(), true);
- List<Node> openMilestones = new ArrayList<>();
-
- if (nit.hasNext()) {
- List<Node> overdueMilestones = new ArrayList<>();
- while (nit.hasNext()) {
- Node currNode = nit.nextNode();
- openMilestones.add(currNode);
- if (isOverdue(currNode, TrackerNames.TRACKER_TARGET_DATE))
- overdueMilestones.add(currNode);
- }
- if (!overdueMilestones.isEmpty()) {
- Composite overdueCmp = new Composite(leftCmp, SWT.NO_FOCUS);
- long size = overdueMilestones.size();
- String overdueStr = "You have " + size + " overdue milestone" + (size > 1 ? "s" : "") + ": ";
- populateMuliValueClickableList(overdueCmp, overdueMilestones.toArray(new Node[0]), new MilestoneLp(),
- overdueStr);
+ if (trackerService != null) {
+ nit = trackerService.getMyMilestones(getSession(), true);
+ List<Node> openMilestones = new ArrayList<>();
+
+ if (nit.hasNext()) {
+ List<Node> overdueMilestones = new ArrayList<>();
+ while (nit.hasNext()) {
+ Node currNode = nit.nextNode();
+ openMilestones.add(currNode);
+ if (isOverdue(currNode, TrackerNames.TRACKER_TARGET_DATE))
+ overdueMilestones.add(currNode);
+ }
+ if (!overdueMilestones.isEmpty()) {
+ Composite overdueCmp = new Composite(leftCmp, SWT.NO_FOCUS);
+ long size = overdueMilestones.size();
+ String overdueStr = "You have " + size + " overdue milestone" + (size > 1 ? "s" : "") + ": ";
+ populateMuliValueClickableList(overdueCmp, overdueMilestones.toArray(new Node[0]),
+ new MilestoneLp(), overdueStr);
+ }
}
- }
- // My projects
- List<Node> openProjects = JcrUtils.nodeIteratorToList(trackerService.getMyProjects(getSession(), true));
- if (!openProjects.isEmpty()) {
- Group myProjectsGp = new Group(rightCmp, SWT.NO_FOCUS);
- myProjectsGp.setText("My open projects");
- myProjectsGp.setLayoutData(EclipseUiUtils.fillWidth());
- populateMuliValueClickableList(myProjectsGp, openProjects.toArray(new Node[0]), new ProjectLp(), null);
- }
+ // My projects
+ List<Node> openProjects = JcrUtils.nodeIteratorToList(trackerService.getMyProjects(getSession(), true));
+ if (!openProjects.isEmpty()) {
+ Group myProjectsGp = new Group(rightCmp, SWT.NO_FOCUS);
+ myProjectsGp.setText("My open projects");
+ myProjectsGp.setLayoutData(EclipseUiUtils.fillWidth());
+ populateMuliValueClickableList(myProjectsGp, openProjects.toArray(new Node[0]), new ProjectLp(), null);
+ }
- // My Milestones
- if (!openMilestones.isEmpty()) {
- Group myMilestoneGp = new Group(rightCmp, SWT.NO_FOCUS);
- myMilestoneGp.setText("My open milestones");
- myMilestoneGp.setLayoutData(EclipseUiUtils.fillWidth());
- populateMuliValueClickableList(myMilestoneGp, openMilestones.toArray(new Node[0]), new MilestoneLp(), null);
+ // My Milestones
+ if (!openMilestones.isEmpty()) {
+ Group myMilestoneGp = new Group(rightCmp, SWT.NO_FOCUS);
+ myMilestoneGp.setText("My open milestones");
+ myMilestoneGp.setLayoutData(EclipseUiUtils.fillWidth());
+ populateMuliValueClickableList(myMilestoneGp, openMilestones.toArray(new Node[0]), new MilestoneLp(),
+ null);
+ }
}
}
}
}
- public void setActivitiesService(ActivitiesService activitiesService) {
- this.activitiesService = activitiesService;
- }
-
- public void setTrackerService(TrackerService trackerService) {
- this.trackerService = trackerService;
- }
+ // public void setActivitiesService(ActivitiesService activitiesService) {
+ // this.activitiesService = activitiesService;
+ // }
+ //
+ // public void setTrackerService(TrackerService trackerService) {
+ // this.trackerService = trackerService;
+ // }
// LOCAL HELPERS
private void populateMuliValueClickableList(Composite parent, Node[] nodes, ColumnLabelProvider lp,
<imports xsi:type="commands:Command" xmi:id="_M5YvJkIfEeij3Nr_iRrJtw" elementId="org.argeo.suite.e4.command.openPerspective" commandName="Open Perspective">
<parameters xmi:id="_M5YvJ0IfEeij3Nr_iRrJtw" elementId="perspectiveId" name="Perspective Id" optional="false"/>
</imports>
- <fragments xsi:type="fragment:StringModelFragment" xmi:id="_IEOXA0IfEeij3Nr_iRrJtw" featurename="children" parentElementId="org.argeo.suite.e4.trimbar.top">
- <elements xsi:type="menu:ToolBar" xmi:id="_IEOXBEIfEeij3Nr_iRrJtw" elementId="org.argeo.suite.e4.toolbar.newEntity">
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="_IEOXA0IfEeij3Nr_iRrJtw" featurename="children" parentElementId="org.argeo.suite.e4.trimbar.top" positionInList="after:org.argeo.suite.e4.toolbar.standard">
+ <elements xsi:type="menu:ToolBar" xmi:id="_IEOXBEIfEeij3Nr_iRrJtw" elementId="org.argeo.suite.e4.toolbar.newStandardEntity">
<children xsi:type="menu:HandledToolItem" xmi:id="_IEOXBUIfEeij3Nr_iRrJtw" elementId="org.argeo.suite.e4.handledtoolitem.createTask" label="New Task" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/types/todo.png" command="_IEOXAUIfEeij3Nr_iRrJtw">
<parameters xmi:id="_IEOXBkIfEeij3Nr_iRrJtw" elementId="targetNodeType" name="targetNodeType" value="activities:task"/>
</children>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="Tracker E4 Service">
+ <implementation class="org.argeo.tracker.e4.TrackerE4Service"/>
+ <service>
+ <provide interface="org.argeo.connect.e4.AppE4Service"/>
+ <provide interface="org.argeo.connect.ui.AppWorkbenchService"/>
+ </service>
+ <property name="service.ranking" type="Integer" value="10"/>
+ <reference bind="setActivitiesService" cardinality="1..1" interface="org.argeo.activities.ActivitiesService" name="ActivitiesService" policy="static"/>
+ <reference bind="setUserAdminService" cardinality="1..1" interface="org.argeo.connect.UserAdminService" name="UserAdminService" policy="static"/>
+ <reference bind="setTrackerService" cardinality="1..1" interface="org.argeo.tracker.TrackerService" name="TrackerService" policy="static"/>
+</scr:component>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="init" deactivate="destroy" immediate="true" name="Tracker Maintenance Service">
+ <implementation class="org.argeo.tracker.core.TrackerMaintenanceService"/>
+ <service>
+ <provide interface="org.argeo.connect.AppMaintenanceService"/>
+ </service>
+ <reference bind="setRepository" cardinality="1..1" interface="javax.jcr.Repository" name="Repository" policy="static" target="(cn=connect)"/>
+ <reference bind="setUserAdminService" cardinality="1..1" interface="org.argeo.connect.UserAdminService" name="UserAdminService" policy="static"/>
+</scr:component>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="Tracker Service">
+ <implementation class="org.argeo.tracker.core.TrackerServiceImpl"/>
+ <service>
+ <provide interface="org.argeo.connect.AppService"/>
+ <provide interface="org.argeo.tracker.TrackerService"/>
+ </service>
+ <reference bind="setActivitiesService" cardinality="1..1" interface="org.argeo.activities.ActivitiesService" name="ActivitiesService" policy="static"/>
+</scr:component>
Bundle-SymbolicName: org.argeo.suite.tracker;singleton:=true
Bundle-ActivationPolicy: lazy
+
+Service-Component: OSGI-INF/trackerService.xml,\
+OSGI-INF/trackerMaintenanceService.xml,\
+OSGI-INF/trackerE4Service.xml
+
+Import-Package: javax.jcr,\
+org.argeo.connect,\
+org.argeo.activities,\
+org.argeo.tracker,\
+org.argeo.tracker.core,\
+org.argeo.tracker.e4,\
+*
<imports xsi:type="commands:Command" xmi:id="_Dppf4FuLEeioOJZqIpekPQ" elementId="org.argeo.suite.e4.command.createEntity">
<parameters xmi:id="_HsY8kFuLEeioOJZqIpekPQ" elementId="targetNodeType" name="targetNodeType" optional="false"/>
</imports>
- <fragments xsi:type="fragment:StringModelFragment" xmi:id="_1ISvQVuKEeioOJZqIpekPQ" featurename="children" parentElementId="org.argeo.suite.e4.trimbar.top">
- <elements xsi:type="menu:ToolBar" xmi:id="_1ISvQluKEeioOJZqIpekPQ" elementId="org.argeo.suite.e4.toolbar.2">
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="_1ISvQVuKEeioOJZqIpekPQ" featurename="children" parentElementId="org.argeo.suite.e4.trimbar.top" positionInList="">
+ <elements xsi:type="menu:ToolBar" xmi:id="_1ISvQluKEeioOJZqIpekPQ" elementId="org.argeo.suite.e4.toolbar.newTrackerEntity">
<children xsi:type="menu:HandledToolItem" xmi:id="_3CFicFuKEeioOJZqIpekPQ" elementId="org.argeo.suite.tracker.handledtoolitem.newTrackerTask" label="New Tracker Task" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/types/task.png" command="_Dppf4FuLEeioOJZqIpekPQ">
<parameters xmi:id="_4EGjoFuLEeioOJZqIpekPQ" elementId="org.argeo.suite.tracker.parameter.1" name="targetNodeType" value="tracker:task"/>
</children>