Skip to main content
summaryrefslogtreecommitdiffstats
blob: 0317480443c0b0c64833d5428abb92b496efda9c (plain) (blame)
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
128
129
130
131
/*******************************************************************************
 * Copyright (c) 2013 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.api.util;

import java.util.Collection;
import java.util.List;
import org.eclipse.osee.ats.api.IAtsObject;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.notify.AtsNotificationCollector;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.api.workflow.IAttribute;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttributeType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;

/**
 * @author Donald G. Dunne
 */
public interface IAtsChangeSet {

   void add(Object obj) throws OseeCoreException;

   /**
    * Store changed items.
    *
    * @throws OseeCoreException if no items exist to store. Use executeIfNeeded to execute quietly.
    */
   TransactionId execute() throws OseeCoreException;

   void clear();

   void addExecuteListener(IExecuteListener listener);

   void addToDelete(Object obj) throws OseeCoreException;

   void addAll(Object... objects) throws OseeCoreException;

   boolean isEmpty();

   void deleteSoleAttribute(IAtsWorkItem workItem, IAttributeType attributeType) throws OseeCoreException;

   void setSoleAttributeValue(IAtsWorkItem workItem, IAttributeType attributeType, String value) throws OseeCoreException;

   void setSoleAttributeValue(IAtsObject atsObject, IAttributeType attributeType, Object value) throws OseeCoreException;

   void setSoleAttributeValue(ArtifactId artifact, IAttributeType attributeType, String value);

   void addAttribute(IAtsObject atsObject, IAttributeType attributeType, Object value) throws OseeCoreException;

   <T> void setValue(IAtsWorkItem workItem, IAttribute<String> attr, IAttributeType attributeType, T value) throws OseeCoreException;

   <T> void deleteAttribute(IAtsWorkItem workItem, IAttribute<T> attr) throws OseeCoreException;

   void deleteAttribute(IAtsObject atsObject, IAttributeType attributeType, Object value) throws OseeCoreException;

   boolean isAttributeTypeValid(IAtsWorkItem workItem, IAttributeType attributeType);

   ArtifactId createArtifact(IArtifactType artifactType, String name);

   void deleteAttributes(IAtsObject atsObject, IAttributeType attributeType);

   ArtifactToken createArtifact(IArtifactType artifactType, String name, String guid);

   ArtifactToken createArtifact(IArtifactType artifactType, String name, String guid, Long uuid);

   void relate(Object object1, RelationTypeSide relationSide, Object object2);

   AtsNotificationCollector getNotifications();

   void unrelateAll(Object object, RelationTypeSide relationType);

   void setRelation(Object object1, RelationTypeSide relationType, Object object2);

   public void setRelations(Object object, RelationTypeSide relationSide, Collection<? extends Object> objects);

   <T> void setAttribute(IAtsWorkItem workItem, int attributeId, T value);

   ArtifactId createArtifact(ArtifactToken token);

   void deleteArtifact(ArtifactId artifact);

   void deleteAttribute(ArtifactId artifact, IAttribute<?> attr);

   void addWorkflowCreated(IAtsTeamWorkflow teamWf);

   void deleteArtifact(IAtsWorkItem workItem);

   void setValues(IAtsObject atsObject, IAttributeType attrType, List<String> values);

   String getComment();

   <T> void setAttribute(ArtifactId artifact, int attrId, T value);

   /**
    * Will check if anything is to be stored, else return quietly.
    */
   void executeIfNeeded();

   /**
    * User making these changes
    */
   IAtsUser getAsUser();

   void unrelate(ArtifactId artifact, RelationTypeSide relationSide, ArtifactId artifact2);

   void unrelate(IAtsObject atsObject, RelationTypeSide relationSide, IAtsObject atsObjec2);

   void unrelate(ArtifactId artifact, RelationTypeSide relationSide, IAtsObject atsObject);

   void unrelate(IAtsObject atsObject, RelationTypeSide relationSide, ArtifactId artifact);

   void addAttribute(ArtifactId artifactId, IAttributeType attrType, Object value);

   void setSoleAttributeFromString(ArtifactId artifact, IAttributeType attrType, String value);

   void setSoleAttributeFromString(IAtsObject atsObject, IAttributeType attributeType, String value);

}

Back to the top