Mercurial > hg > ismi-richfaces
annotate src/main/java/de/mpiwg/itgroup/ismi/browse/EntityDetailsBean.java @ 194:c7fec83ab69a
fix bugs with make-public buttons in entity details form. Closes #152.
author | Robert Casties <casties@mpiwg-berlin.mpg.de> |
---|---|
date | Fri, 07 Dec 2018 15:47:06 +0100 |
parents | 8aff920ec7c0 |
children |
rev | line source |
---|---|
1 | 1 package de.mpiwg.itgroup.ismi.browse; |
2 | |
3 import java.util.ArrayList; | |
4 import java.util.HashMap; | |
5 import java.util.List; | |
6 import java.util.Map; | |
7 | |
8 import javax.faces.event.ActionEvent; | |
9 | |
10 import org.apache.log4j.Logger; | |
11 import org.mpi.openmind.repository.bo.Attribute; | |
12 import org.mpi.openmind.repository.bo.Entity; | |
13 import org.mpi.openmind.repository.bo.Node; | |
14 import org.mpi.openmind.repository.bo.Relation; | |
15 | |
16 import de.mpiwg.itgroup.ismi.entry.beans.SessionBean; | |
148
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
17 import de.mpiwg.itgroup.ismi.entry.utils.PrivacityUtils; |
1 | 18 import de.mpiwg.itgroup.ismi.event.beans.CopyEvent; |
19 import de.mpiwg.itgroup.ismi.event.beans.StudyEvent; | |
20 import de.mpiwg.itgroup.ismi.event.beans.TransferEvent; | |
21 | |
99 | 22 public class EntityDetailsBean extends AbstractBrowse { |
1 | 23 |
24 private static final long serialVersionUID = 1374652791403248103L; | |
25 | |
26 private static Logger logger = Logger.getLogger(EntityDetailsBean.class); | |
27 | |
28 private Entity entity; | |
29 private String currentEntityId; | |
30 | |
31 private List<Attribute> attributeList = new ArrayList<Attribute>(); | |
32 private List<String> sourceRelationNames = new ArrayList<String>(); | |
33 private List<String> targetRelationNames = new ArrayList<String>(); | |
34 | |
35 private Map<String, Long> sourceRelationCount = new HashMap<String, Long>(); | |
36 private Map<String, Long> targetRelationCount = new HashMap<String, Long>(); | |
37 | |
38 private Map<String, List<Relation>> sourceRelations = new HashMap<String, List<Relation>>(); | |
39 private Map<String, List<Relation>> targetRelations = new HashMap<String, List<Relation>>(); | |
40 | |
41 private List<Entity> previousVersionsList = new ArrayList<Entity>(); | |
42 private Entity selectedPreviousVersion = null; | |
43 private boolean previousVersionDetailsVisible = false; | |
44 | |
45 | |
46 public EntityDetailsBean() { | |
47 } | |
48 | |
49 public void listenerHideDetailsPopup(ActionEvent event){ | |
50 setPreviousVersionDetailsVisible(false); | |
51 } | |
52 | |
53 public void listenerHidePreviousVersions(ActionEvent event){ | |
54 setPreviousVersionsList(new ArrayList<Entity>()); | |
55 setSelectedPreviousVersion(null); | |
56 } | |
57 | |
58 public void listenerUndoUntilThisVersion(ActionEvent event) throws Exception{ | |
59 this.selectedPreviousVersion = (Entity)getRequestBean("previousVersion"); | |
60 if(this.selectedPreviousVersion != null){ | |
61 | |
62 //checking whether the relation reference to existing entities, | |
63 //If the entity referenced does not exist more, the relation will not be considered. | |
64 | |
65 //Checking source's relation | |
66 List<Relation> relToDelete = new ArrayList<Relation>(); | |
67 for(Relation rel : selectedPreviousVersion.getSourceRelations()){ | |
68 if(getWrapper().getEntityById(rel.getTargetId()) == null){ | |
69 relToDelete.add(rel); | |
70 } | |
71 } | |
72 for(Relation rel : relToDelete){ | |
73 selectedPreviousVersion.getSourceRelations().remove(rel); | |
74 } | |
75 | |
76 //Checking target's relations | |
77 relToDelete = new ArrayList<Relation>(); | |
78 for(Relation rel : selectedPreviousVersion.getTargetRelations()){ | |
79 if(getWrapper().getEntityById(rel.getSourceId()) == null){ | |
80 relToDelete.add(rel); | |
81 } | |
82 } | |
83 for(Relation rel : relToDelete){ | |
84 selectedPreviousVersion.getTargetRelations().remove(rel); | |
85 } | |
86 | |
87 selectedPreviousVersion.setVersion(this.entity.getVersion()); | |
88 selectedPreviousVersion.setSystemStatus(Node.SYS_STATUS_CURRENT_VERSION); | |
89 | |
124
28a0c2726466
changed saveEntity() to use new EditIntent. Set up EditIntent for TEXT, PERSON, REFERENCE.
casties
parents:
119
diff
changeset
|
90 getWrapper().saveEntity(selectedPreviousVersion, getUserName(), null); |
1 | 91 |
92 } | |
93 } | |
94 | |
95 | |
96 | |
97 public void listenerGetPreviousVersions(ActionEvent event){ | |
98 this.previousVersionsList = getWrapper().getPreviousEntitiesById(getEntity().getId()); | |
99 if(previousVersionsList.size() == 0){ | |
100 addGeneralMsg("It had not been found previous versions for this entity."); | |
101 } | |
102 } | |
103 | |
104 public void listenerShowPreviousVersionDetails(ActionEvent event){ | |
105 this.selectedPreviousVersion = (Entity)getRequestBean("previousVersion"); | |
106 setPreviousVersionDetailsVisible(true); | |
119 | 107 //System.out.println(this.selectedPreviousVersion); |
1 | 108 } |
109 | |
110 | |
111 | |
112 public void listenerShowEntity(ActionEvent event) { | |
113 try { | |
114 Long.parseLong(currentEntityId); | |
115 redirect("/browse/entityDetails.xhtml", "?eid=" + currentEntityId); | |
116 | |
117 } catch (Exception e) { | |
118 addErrorMsg("ID is not valid: " + this.currentEntityId); | |
119 } | |
120 } | |
121 | |
122 public void setEntity(Entity entity) { | |
123 this.entity = entity; | |
124 if(entity != null){ | |
125 | |
126 this.currentEntityId = entity.getId().toString(); | |
127 | |
128 this.selectedPreviousVersion = null; | |
129 this.previousVersionsList = new ArrayList<Entity>(); | |
130 //this.definition = getWrapper().getDefinition(entity.getObjectClass()); | |
131 this.attributeList = getWrapper().getAttributeByEntId(entity.getId()); | |
132 this.sourceRelations = new HashMap<String, List<Relation>>(); | |
133 this.targetRelations = new HashMap<String, List<Relation>>(); | |
134 this.sourceRelationNames = new ArrayList<String>(); | |
135 this.targetRelationNames = new ArrayList<String>(); | |
136 this.sourceRelationCount = new HashMap<String, Long>(); | |
137 this.targetRelationCount = new HashMap<String, Long>(); | |
138 | |
139 | |
119 | 140 //System.out.println("****************"); |
1 | 141 List<Relation> srcRels = getWrapper().getDefSourceRelations(this.entity.getObjectClass()); |
142 for(Relation rel : srcRels){ | |
143 if(rel.getOwnValue().equals("has_autor_misattribution")){ | |
119 | 144 logger.debug("misattribution: src - " + rel.getOwnValue()); |
1 | 145 } |
146 if(!this.sourceRelationNames.contains(rel.getOwnValue())){ | |
147 this.sourceRelationNames.add(rel.getOwnValue()); | |
148 this.sourceRelationCount.put(rel.getOwnValue(), getWrapper().getSourceRelationsCount(entity, rel.getOwnValue(), null)); | |
149 } | |
150 } | |
151 List<Relation> tarRels = getWrapper().getDefTargetRelations(this.entity.getObjectClass()); | |
152 for(Relation rel : tarRels){ | |
153 if(!this.targetRelationNames.contains(rel.getOwnValue())){ | |
154 this.targetRelationNames.add(rel.getOwnValue()); | |
155 this.targetRelationCount.put(rel.getOwnValue(), getWrapper().getTargetRelationsCount(entity, rel.getOwnValue(), null)); | |
156 } | |
157 | |
158 } | |
159 } | |
160 } | |
161 | |
162 public void listenerShowTargetRelations(ActionEvent event){ | |
163 String tarName = (String) getRequestBean("tarName"); | |
164 this.targetRelations.put(tarName, getWrapper().getTargetRelations(this.entity, tarName, null, -1)); | |
165 } | |
166 | |
102
db3e1bbfde03
fix error when EntityRepositoryBean is not available when deleting an entity.
casties
parents:
99
diff
changeset
|
167 /** |
db3e1bbfde03
fix error when EntityRepositoryBean is not available when deleting an entity.
casties
parents:
99
diff
changeset
|
168 * Handler that deletes the current Entity. |
db3e1bbfde03
fix error when EntityRepositoryBean is not available when deleting an entity.
casties
parents:
99
diff
changeset
|
169 * @return |
db3e1bbfde03
fix error when EntityRepositoryBean is not available when deleting an entity.
casties
parents:
99
diff
changeset
|
170 */ |
1 | 171 public String listenerDeleteEntity(){ |
172 try { | |
102
db3e1bbfde03
fix error when EntityRepositoryBean is not available when deleting an entity.
casties
parents:
99
diff
changeset
|
173 // get user name from SessionBean |
db3e1bbfde03
fix error when EntityRepositoryBean is not available when deleting an entity.
casties
parents:
99
diff
changeset
|
174 SessionBean session = (SessionBean) getSessionBean("Session"); |
db3e1bbfde03
fix error when EntityRepositoryBean is not available when deleting an entity.
casties
parents:
99
diff
changeset
|
175 String user = ""; |
db3e1bbfde03
fix error when EntityRepositoryBean is not available when deleting an entity.
casties
parents:
99
diff
changeset
|
176 if (session != null) { |
db3e1bbfde03
fix error when EntityRepositoryBean is not available when deleting an entity.
casties
parents:
99
diff
changeset
|
177 user = session.getUsername(); |
db3e1bbfde03
fix error when EntityRepositoryBean is not available when deleting an entity.
casties
parents:
99
diff
changeset
|
178 } |
db3e1bbfde03
fix error when EntityRepositoryBean is not available when deleting an entity.
casties
parents:
99
diff
changeset
|
179 |
99 | 180 // delete entity |
181 getWrapper().removeCurrentVersionEntity(this.entity, user); | |
102
db3e1bbfde03
fix error when EntityRepositoryBean is not available when deleting an entity.
casties
parents:
99
diff
changeset
|
182 |
db3e1bbfde03
fix error when EntityRepositoryBean is not available when deleting an entity.
casties
parents:
99
diff
changeset
|
183 // reset EntityRepositoryBean |
db3e1bbfde03
fix error when EntityRepositoryBean is not available when deleting an entity.
casties
parents:
99
diff
changeset
|
184 EntityRepositoryBean bean = (EntityRepositoryBean) getSessionBean("EntityRepository"); |
1 | 185 if(bean != null){ |
186 bean.reset(); | |
187 } | |
188 addGeneralMsg("The entity has been removed."); | |
102
db3e1bbfde03
fix error when EntityRepositoryBean is not available when deleting an entity.
casties
parents:
99
diff
changeset
|
189 |
1 | 190 } catch (Exception e) { |
191 printInternalError(e); | |
192 logger.error(e.getMessage() + " Removing" + entity, e); | |
193 } | |
194 | |
195 return GOTO_ENTITY_REPOSITORY; | |
196 } | |
197 | |
198 public void listenerShowSourceRelations(ActionEvent event){ | |
199 try { | |
200 String srcName = (String) getRequestBean("srcName"); | |
201 this.sourceRelations.put(srcName, getWrapper().getSourceRelations(this.entity, srcName, null, -1)); | |
202 } catch (Exception e) { | |
203 printInternalError(e); | |
204 logger.error(e.getMessage(), e); | |
205 } | |
206 } | |
207 public Entity getEntity() { | |
208 return entity; | |
209 } | |
210 | |
211 | |
212 | |
213 /** | |
214 * This method calls the SessionBean and put in it the current entity to be | |
215 * modified. | |
216 * | |
217 * @return | |
218 */ | |
219 public String actionEdit() { | |
220 try { | |
221 // getting de.mpiwg.itgroup.ismi.entry.beans.SessionBean | |
222 getSessionBean().editEntity(this.entity); | |
223 | |
224 } catch (Exception e) { | |
148
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
225 logger.error(e); |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
226 } |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
227 |
1 | 228 if(entity.getObjectClass().equals(StudyEvent.OC) || |
229 entity.getObjectClass().equals(CopyEvent.OC) || | |
230 entity.getObjectClass().equals(TransferEvent.OC)){ | |
231 return SessionBean.PAGE_EVENT_FORM; | |
232 }else{ | |
233 return SessionBean.PAGE_ENTRY; | |
234 } | |
235 } | |
236 | |
148
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
237 |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
238 /** |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
239 * Toggle this entity's public state. |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
240 * @return |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
241 */ |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
242 public String actionChangeEntityPrivacity() { |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
243 // toggle publication state |
194
c7fec83ab69a
fix bugs with make-public buttons in entity details form. Closes #152.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
189
diff
changeset
|
244 Entity saveEnt = PrivacityUtils.changeEntityPrivacity(this.entity, null, getWrapper()); |
148
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
245 ArrayList<Entity> saveList = new ArrayList<Entity>(); |
194
c7fec83ab69a
fix bugs with make-public buttons in entity details form. Closes #152.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
189
diff
changeset
|
246 saveList.add(saveEnt); |
148
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
247 try { |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
248 getWrapper().saveEntityListAsNodeWithoutContent(saveList, getUserName()); |
194
c7fec83ab69a
fix bugs with make-public buttons in entity details form. Closes #152.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
189
diff
changeset
|
249 this.entity = saveEnt; |
148
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
250 } catch (Exception e) { |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
251 printInternalError(e); |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
252 logger.error(e); |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
253 } |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
254 return GOTO_ENTITY_DETAILS; |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
255 } |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
256 |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
257 /** |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
258 * Change all related entities' public state to match this entity. |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
259 * |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
260 * @return |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
261 */ |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
262 public String actionChangeRelatedEntitiesPrivacity() { |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
263 // set publication state |
189
8aff920ec7c0
fix problem with making entities public when there are loops in the relations.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
175
diff
changeset
|
264 Map<Long, Entity> modified = new HashMap<Long,Entity>(); |
8aff920ec7c0
fix problem with making entities public when there are loops in the relations.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
175
diff
changeset
|
265 modified = PrivacityUtils.setRelatedEntitiesPrivacity(this.entity, null, getWrapper(), null, modified); |
148
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
266 // hide related entities from display |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
267 sourceRelations = new HashMap<String, List<Relation>>(); |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
268 targetRelations = new HashMap<String, List<Relation>>(); |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
269 // save entities |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
270 try { |
189
8aff920ec7c0
fix problem with making entities public when there are loops in the relations.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
175
diff
changeset
|
271 getWrapper().saveEntityListAsNodeWithoutContent(new ArrayList<Entity>(modified.values()), getUserName()); |
148
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
272 } catch (Exception e) { |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
273 printInternalError(e); |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
274 logger.error(e); |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
275 } |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
276 return GOTO_ENTITY_DETAILS; |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
277 } |
b40a84944716
add public/private editing to Entity Details.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
124
diff
changeset
|
278 |
1 | 279 /** |
280 * <p> | |
281 * Show the details page for the current entity. | |
282 * </p> | |
283 */ | |
284 public String showTarget() { | |
285 Relation relation = (Relation) getRequestBean("srcRelation"); | |
286 setEntity(relation.getTarget()); | |
287 return GOTO_ENTITY_DETAILS; | |
288 } | |
289 | |
290 public String showSource() { | |
291 Relation relation = (Relation) getRequestBean("tarRelation"); | |
292 setEntity(relation.getSource()); | |
293 return GOTO_ENTITY_DETAILS; | |
294 } | |
295 | |
296 public Entity getEntityById(Long id) { | |
297 //juc return getOntology().getEntityById(id); | |
298 return getWrapper().getEntityById(id); | |
299 } | |
300 | |
301 public String getCurrentEntityId() { | |
302 return currentEntityId; | |
303 } | |
304 | |
305 public void setCurrentEntityId(String cid) { | |
306 this.currentEntityId = cid; | |
307 } | |
308 | |
309 public List<Attribute> getAttributeList() { | |
310 return attributeList; | |
311 } | |
312 | |
313 public void setAttributeList(List<Attribute> attributeList) { | |
314 this.attributeList = attributeList; | |
315 } | |
316 public List<String> getSourceRelationNames() { | |
317 return sourceRelationNames; | |
318 } | |
319 | |
320 public void setSourceRelationNames(List<String> sourceRelationNames) { | |
321 this.sourceRelationNames = sourceRelationNames; | |
322 } | |
323 | |
324 public List<String> getTargetRelationNames() { | |
325 return targetRelationNames; | |
326 } | |
327 | |
328 public void setTargetRelationNames(List<String> targetRelationNames) { | |
329 this.targetRelationNames = targetRelationNames; | |
330 } | |
331 | |
332 public Map<String, Long> getSourceRelationCount() { | |
333 return sourceRelationCount; | |
334 } | |
335 | |
336 public void setSourceRelationCount(Map<String, Long> sourceRelationCount) { | |
337 this.sourceRelationCount = sourceRelationCount; | |
338 } | |
339 | |
340 public Map<String, Long> getTargetRelationCount() { | |
341 return targetRelationCount; | |
342 } | |
343 | |
344 public void setTargetRelationCount(Map<String, Long> targetRelationCount) { | |
345 this.targetRelationCount = targetRelationCount; | |
346 } | |
347 | |
348 public Map<String, List<Relation>> getSourceRelations() { | |
349 return sourceRelations; | |
350 } | |
351 | |
352 public void setSourceRelations(Map<String, List<Relation>> sourceRelations) { | |
353 this.sourceRelations = sourceRelations; | |
354 } | |
355 | |
356 public Map<String, List<Relation>> getTargetRelations() { | |
357 return targetRelations; | |
358 } | |
359 | |
360 public void setTargetRelations(Map<String, List<Relation>> targetRelations) { | |
361 this.targetRelations = targetRelations; | |
362 } | |
363 | |
364 public List<Entity> getPreviousVersionsList() { | |
365 return previousVersionsList; | |
366 } | |
367 | |
368 public void setPreviousVersionsList(List<Entity> previousVersionsList) { | |
369 this.previousVersionsList = previousVersionsList; | |
370 } | |
371 | |
372 public Entity getSelectedPreviousVersion() { | |
373 return selectedPreviousVersion; | |
374 } | |
375 | |
376 public void setSelectedPreviousVersion(Entity selectedPreviousVersion) { | |
377 this.selectedPreviousVersion = selectedPreviousVersion; | |
378 } | |
379 public boolean isPreviousVersionDetailsVisible() { | |
380 return previousVersionDetailsVisible; | |
381 } | |
382 | |
383 public void setPreviousVersionDetailsVisible( | |
384 boolean previousVersionDetailsVisible) { | |
385 this.previousVersionDetailsVisible = previousVersionDetailsVisible; | |
386 } | |
387 } |