1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
/*******************************************************************************
* Copyright (c) 2004, 2007 Boeing.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
package org.eclipse.osee.ats.editor.stateItem;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.editor.SMAWorkFlowSection;
import org.eclipse.osee.ats.workdef.StateXWidgetPage;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.plugin.util.Result;
import org.eclipse.osee.framework.ui.skynet.widgets.XModifiedListener;
import org.eclipse.osee.framework.ui.skynet.widgets.XWidget;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
* @author Donald G. Dunne
*/
public abstract class AtsStateItem implements IAtsStateItem {
public final static String ALL_STATE_IDS = "ALL";
@SuppressWarnings("unused")
@Override
public Result committing(AbstractWorkflowArtifact sma) throws OseeCoreException {
return Result.TrueResult;
}
@SuppressWarnings("unused")
@Override
public String getBranchShortName(AbstractWorkflowArtifact sma) throws OseeCoreException {
return null;
}
protected String getId() {
return null;
}
@SuppressWarnings("unused")
@Override
public Collection<String> getIds() throws OseeCoreException {
if (getId() == null) {
return Collections.emptyList();
}
return Arrays.asList(getId());
}
@SuppressWarnings("unused")
@Override
public Collection<User> getOverrideTransitionToAssignees(SMAWorkFlowSection section) throws OseeCoreException {
return null;
}
@SuppressWarnings("unused")
@Override
public String getOverrideTransitionToStateName(SMAWorkFlowSection section) throws OseeCoreException {
return null;
}
@SuppressWarnings("unused")
@Override
public List<XWidget> getDynamicXWidgetsPostBody(AbstractWorkflowArtifact sma) throws OseeCoreException {
return Collections.emptyList();
}
@SuppressWarnings("unused")
@Override
public List<XWidget> getDynamicXWidgetsPreBody(AbstractWorkflowArtifact sma) throws OseeCoreException {
return Collections.emptyList();
}
@SuppressWarnings("unused")
@Override
public Result pageCreated(FormToolkit toolkit, StateXWidgetPage page, AbstractWorkflowArtifact sma, XModifiedListener xModListener, boolean isEditable) throws OseeCoreException {
return Result.TrueResult;
}
@SuppressWarnings("unused")
@Override
public void transitioned(AbstractWorkflowArtifact sma, IWorkPage fromState, IWorkPage toState, Collection<User> toAssignees, SkynetTransaction transaction) throws OseeCoreException {
// provided for subclass implementation
}
@SuppressWarnings("unused")
@Override
public Result transitioning(AbstractWorkflowArtifact sma, IWorkPage fromState, IWorkPage toState, Collection<User> toAssignees) throws OseeCoreException {
return Result.TrueResult;
}
@SuppressWarnings("unused")
@Override
public void widgetModified(SMAWorkFlowSection section, XWidget xWidget) throws OseeCoreException {
// provided for subclass implementation
}
@SuppressWarnings("unused")
@Override
public void xWidgetCreated(XWidget xWidget, FormToolkit toolkit, StateXWidgetPage page, Artifact art, XModifiedListener xModListener, boolean isEditable) throws OseeCoreException {
// provided for subclass implementation
}
@SuppressWarnings("unused")
@Override
public Result xWidgetCreating(XWidget xWidget, FormToolkit toolkit, StateXWidgetPage page, Artifact art, XModifiedListener xModListener, boolean isEditable) throws OseeCoreException {
return Result.TrueResult;
}
@SuppressWarnings("unused")
@Override
public boolean isAccessControlViaAssigneesEnabledForBranching() throws OseeCoreException {
return false;
}
}
|