Mercurial > hg > ismi-richfaces
annotate src/main/java/de/mpiwg/itgroup/ismi/entry/beans/SessionBean.java @ 180:0d31c8be7c31
new MissingRelations feature and UI.
including searchByRelations() with Filter in FullEntityRepositoryBean.
author | Robert Casties <casties@mpiwg-berlin.mpg.de> |
---|---|
date | Wed, 13 Jun 2018 14:57:13 +0200 |
parents | ca83d67a2dc9 |
children | 52aa06772336 |
rev | line source |
---|---|
1 | 1 package de.mpiwg.itgroup.ismi.entry.beans; |
2 | |
3 import java.io.IOException; | |
4 import java.io.Serializable; | |
5 import java.util.ArrayList; | |
6 import java.util.List; | |
7 | |
8 import javax.faces.context.ExternalContext; | |
9 import javax.faces.context.FacesContext; | |
10 import javax.faces.event.ActionEvent; | |
11 import javax.servlet.http.HttpServletRequest; | |
12 | |
13 import org.apache.commons.lang.StringUtils; | |
14 import org.apache.log4j.Logger; | |
15 import org.mpi.openmind.repository.bo.Attribute; | |
16 import org.mpi.openmind.repository.bo.Entity; | |
17 import org.mpi.openmind.security.SecurityService; | |
18 import org.mpi.openmind.security.bo.User; | |
19 import org.richfaces.event.ItemChangeEvent; | |
20 | |
21 import de.mpiwg.itgroup.ismi.admin.AdminBean; | |
22 import de.mpiwg.itgroup.ismi.browse.EntityDetailsBean; | |
23 import de.mpiwg.itgroup.ismi.defs.DefinitionForm; | |
24 import de.mpiwg.itgroup.ismi.entry.beans.AbstractISMIBean.CheckResults; | |
25 import de.mpiwg.itgroup.ismi.event.beans.CopyEvent; | |
26 import de.mpiwg.itgroup.ismi.event.beans.StudyEvent; | |
27 import de.mpiwg.itgroup.ismi.event.beans.TransferEvent; | |
28 import de.mpiwg.itgroup.ismi.merge.GeneralMerge; | |
96 | 29 import de.mpiwg.itgroup.ismi.merge.ImportMerge; |
180
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
30 import de.mpiwg.itgroup.ismi.merge.MissingRelationsBean; |
153
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
31 import de.mpiwg.itgroup.ismi.merge.PublicByAuthorBean; |
85 | 32 import de.mpiwg.itgroup.ismi.merge.ReferenceMerge; |
1 | 33 import de.mpiwg.itgroup.ismi.publicView.DynamicPageEditor; |
34 import de.mpiwg.itgroup.ismi.publicView.PublicCodexBean; | |
35 import de.mpiwg.itgroup.ismi.publicView.PublicCodexView; | |
36 import de.mpiwg.itgroup.ismi.publicView.pages.DynamicPage; | |
37 import de.mpiwg.itgroup.ismi.search.beans.AdvancedSearchBean; | |
38 import de.mpiwg.itgroup.ismi.search.beans.DisplayAuthorBean; | |
39 import de.mpiwg.itgroup.ismi.search.beans.DisplayTitleBean; | |
40 import de.mpiwg.itgroup.ismi.util.guiComponents.Calendar; | |
41 import de.mpiwg.itgroup.ismi.util.guiComponents.EntityList; | |
42 | |
43 public class SessionBean extends AbstractBean implements Serializable{ | |
44 | |
45 private static Logger logger = Logger.getLogger(SessionBean.class); | |
46 | |
47 private DefinitionForm defForm = new DefinitionForm(); | |
48 private StudyEvent studyEventForm = new StudyEvent(); | |
49 private CopyEvent copyEventForm = new CopyEvent(); | |
50 private TransferEvent transferEventForm = new TransferEvent(); | |
51 private transient AdvancedSearchBean advancedSearch = new AdvancedSearchBean(); | |
153
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
52 private transient PublicByAuthorBean publicByAuthor = new PublicByAuthorBean(); |
180
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
53 private transient MissingRelationsBean missingRelations = new MissingRelationsBean(); |
1 | 54 |
55 private EntityDetailsBean entDetailsForm = new EntityDetailsBean(); | |
56 | |
57 private DisplayAuthorBean displayAuthor = new DisplayAuthorBean(); | |
58 private DisplayTitleBean displayTitle = new DisplayTitleBean(); | |
59 | |
60 private DynamicPageEditor pageEditor = null; | |
61 | |
62 | |
63 private Calendar currentCalendar = null; | |
64 private EntityList currentEntListForCalendar = null; | |
65 private Long currentEntIdForCalendar; | |
66 | |
67 private boolean displayLoginDialog = false; | |
68 | |
69 private DigiListBean digiList; | |
70 | |
71 //public | |
72 private DynamicPage dynamicPage; | |
73 private PublicCodexView publicCodexView; | |
74 private PublicCodexBean publicCodexBean; | |
75 | |
76 public void editCalendar(Calendar cal, EntityList list, Long entId){ | |
77 this.currentCalendar = cal; | |
78 this.currentEntListForCalendar = list; | |
79 this.currentEntIdForCalendar = entId; | |
80 } | |
81 | |
82 public void listenerSaveEditionCalendar(ActionEvent event){ | |
83 if(this.currentEntListForCalendar != null && this.currentEntIdForCalendar != null){ | |
84 this.currentEntListForCalendar.getCalendarMap().put(currentEntIdForCalendar, currentCalendar); | |
85 this.currentCalendar = null; | |
86 this.currentEntListForCalendar = null; | |
87 this.currentEntIdForCalendar = null; | |
88 } | |
89 } | |
90 | |
91 | |
92 public static String PAGE_ENTITY_REPOSITORY = "entity_repository"; | |
93 public static String PAGE_ENTITY_DETAILS = "entity_details"; | |
94 public static String PAGE_ENTRY = "entry_edit_entity"; | |
95 public static String PAGE_EVENT_FORM = "event_form"; | |
96 public static String PAGE_SIMPLE_SEARCH = "simple_search"; | |
97 public static String PAGE_PUBLIC_CODICES = "public_codices"; | |
98 public static String PAGE_DISPLAY_TITLE = "display_title"; | |
99 public static String PAGE_DISPLAY_AUTHOR = "display_author"; | |
100 public static String PAGE_GENERAL_MERGE = "general_merge"; | |
101 public static String PAGE_GEO_FORM = "geo_form"; | |
102 public static String PAGE_ADMIN = "admin"; | |
103 public static String PAGE_PROFILE = "profile"; | |
104 public static String PAGE_DEF_EDITOR = "defEditor"; | |
105 | |
106 private User user = null; | |
107 private String username = ""; | |
108 private String password = ""; | |
109 | |
110 //private Entity currentEntity; | |
111 | |
112 private GeneralMerge generalMerge; | |
85 | 113 private ReferenceMerge referenceMerge; |
96 | 114 private ImportMerge importMerge; |
1 | 115 |
116 //private String last_action; | |
117 //private Date time_of_lastAction; | |
118 | |
119 private String remoteAddr; | |
120 | |
121 private static final long serialVersionUID = 1L; | |
122 | |
123 //Entities tabs | |
124 public static String WITNESS_TAB = "Witness"; | |
125 public static String CODEX_TAB = "Codex"; | |
126 public static String COLLECTION_TAB = "Collection"; | |
127 public static String REPOSITORY_TAB = "Repository"; | |
128 public static String CITY_TAB = "Place"; | |
129 public static String TEXT_TAB = "Text"; | |
130 public static String PERSON_TAB = "Person"; | |
131 public static String ALIAS_TAB = "Alias"; | |
132 public static String SUBJECT_TAB = "Subject"; | |
133 public static String ROLE_TAB = "Role"; | |
134 public static String DIGI_TAB = "Digi"; | |
135 | |
136 //Events tabs | |
137 public static String WITNESS_STUDY_EVENT_TAB = "Study"; | |
138 public static String COPY_EVENT_TAB = "Copy"; | |
139 public static String TRANSFER_EVENT_TAB = "Transfer"; | |
140 | |
141 private String selectedTab = WITNESS_TAB; | |
142 private String selectedEventTab = WITNESS_STUDY_EVENT_TAB; | |
143 private String selectedAdvancedSearchTab = "01"; | |
178
ca83d67a2dc9
bugfix and nicer messages for PublicByAuthor feature.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
153
diff
changeset
|
144 private String selectedPublicByAuthorTab = "aut"; |
180
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
145 private String selectedMissingRelationsTab = "aut"; |
1 | 146 |
147 private Long editFormCurrentEntId; | |
148 | |
149 private boolean displayError = false; | |
150 private ArrayList<String> errorMessages; | |
151 | |
152 public String getOCByTabIndex(){ | |
153 if(selectedTab != null){ | |
154 if(selectedTab.equals(WITNESS_TAB)){ | |
155 return AbstractISMIBean.WITNESS; | |
156 }else if(selectedTab.equals(CODEX_TAB)){ | |
157 return AbstractISMIBean.CODEX; | |
158 }else if(selectedTab.equals(COLLECTION_TAB)){ | |
159 return AbstractISMIBean.COLLECTION; | |
160 }else if(selectedTab.equals(REPOSITORY_TAB)){ | |
161 return AbstractISMIBean.REPOSITORY; | |
162 }else if(selectedTab.equals(CITY_TAB)){ | |
163 return AbstractISMIBean.PLACE; | |
164 }else if(selectedTab.equals(TEXT_TAB)){ | |
165 return AbstractISMIBean.TEXT; | |
166 }else if(selectedTab.equals(PERSON_TAB)){ | |
167 return AbstractISMIBean.PERSON; | |
168 }else if(selectedTab.equals(ALIAS_TAB)){ | |
169 return AbstractISMIBean.ALIAS; | |
170 }else if(selectedTab.equals(SUBJECT_TAB)){ | |
171 return AbstractISMIBean.SUBJECT; | |
172 }else if(selectedTab.equals(ROLE_TAB)){ | |
173 return AbstractISMIBean.ROLE; | |
174 }else if(selectedTab.equals(DIGI_TAB)){ | |
175 return AbstractISMIBean.DIGITALIZATION; | |
176 } | |
177 } | |
178 return null; | |
179 } | |
180 | |
181 //************************************ | |
182 //************************************ | |
183 //************************************ | |
184 public SessionBean() { | |
185 if(StringUtils.isBlank(this.remoteAddr)){ | |
186 this.getRemoteAddr(); | |
187 } | |
188 logger.info(" [remoteAddr=" + remoteAddr + "]"); | |
189 } | |
190 | |
191 private void autoLogin(){ | |
192 /* | |
193 this.username = "jurzua@mpiwg-berlin.mpg.de"; | |
194 this.password = "221082"; | |
195 this.login(); | |
196 */ | |
197 } | |
198 | |
199 public void getRemoteAddr(){ | |
200 try{ | |
201 HttpServletRequest httpServletRequest = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest(); | |
202 this.remoteAddr = httpServletRequest.getRemoteAddr(); | |
203 }catch (Exception ex) {} | |
204 } | |
205 | |
206 | |
207 public void listenerLogin(ActionEvent event) { | |
208 this.login(); | |
209 } | |
210 | |
211 public String actionLogin(){ | |
212 this.login(); | |
213 return new String(); | |
214 } | |
215 | |
216 public void listenerDisplayLoginDialog(ActionEvent event) { | |
217 if(user == null){ | |
218 this.displayLoginDialog = true; | |
219 }else{ | |
220 this.displayLoginDialog = false; | |
221 } | |
222 } | |
223 | |
224 public String actionLoginCancel(){ | |
225 this.displayLoginDialog = false; | |
226 return PAGE_SIMPLE_SEARCH; | |
227 } | |
228 | |
229 private void login(){ | |
230 user = null; | |
231 // this.loginMsg = ""; | |
232 | |
233 if (StringUtils.isNotEmpty(username) | |
234 && StringUtils.isNotEmpty(password)) { | |
235 user = getSecurityService().getUserByPassword(username, password); | |
236 } | |
237 | |
238 if (user == null) { | |
239 addErrorMsg("The system does not find the account!"); | |
240 this.displayLoginDialog = false; | |
241 } else { | |
242 if(StringUtils.isBlank(this.remoteAddr)){ | |
243 this.getRemoteAddr(); | |
244 } | |
245 logger.info("login " + username + " [remoteAddr=" + remoteAddr + "]"); | |
246 this.setUser(user); | |
247 this.generalMerge = new GeneralMerge(); | |
85 | 248 this.referenceMerge = new ReferenceMerge(); |
96 | 249 this.importMerge = new ImportMerge(); |
1 | 250 this.defForm = new DefinitionForm(); |
251 // refresh the editor of Dirk | |
252 addSessionBean("CurrentWitness", new CurrentWitnessBean()); | |
253 addSessionBean("CurrentCodex", new CurrentCodexBean()); | |
254 addSessionBean("CurrentText", new CurrentTextBean()); | |
255 addSessionBean("CurrentPerson", new CurrentPersonBean()); | |
256 addSessionBean("CurrentAlias", new CurrentAliasBean()); | |
257 addSessionBean("CurrentCollection", new CurrentCollectionBean()); | |
258 addSessionBean("CurrentRepository", new CurrentRepositoryBean()); | |
259 addSessionBean("CurrentCity", new CurrentCityBean()); | |
260 addSessionBean("CurrentDigi", new CurrentDigitalizationBean()); | |
261 editFormCurrentEntId = null; | |
262 this.displayLoginDialog = false; | |
263 } | |
264 } | |
265 | |
266 public String logout() { | |
267 if(StringUtils.isBlank(this.remoteAddr)){ | |
268 this.getRemoteAddr(); | |
269 } | |
270 logger.info("logout " + username + " [remoteAddr=" + remoteAddr + "]"); | |
271 this.username = ""; | |
272 this.password = ""; | |
273 this.user = null; | |
274 this.generalMerge = null; | |
85 | 275 this.referenceMerge = null; |
1 | 276 this.defForm = null; |
277 return PAGE_PUBLIC_CODICES; | |
278 } | |
279 | |
280 public boolean isCanDelete() { | |
281 return isAdmin(); | |
282 } | |
283 | |
284 public boolean isCanMerge() { | |
285 if (getUser() != null) { | |
286 String role = getUser().getRole(); | |
287 if (StringUtils.isNotEmpty(role)) { | |
288 if (AdminBean.Administrator.equals(role) | |
289 || AdminBean.Researcher.equals(role)) { | |
290 return true; | |
291 } | |
292 } | |
293 } | |
294 return false; | |
295 } | |
296 | |
297 public boolean isCanCreate() { | |
298 if (getUser() != null) { | |
299 String role = getUser().getRole(); | |
300 if (StringUtils.isNotEmpty(role)) { | |
301 if (AdminBean.Administrator.equals(role) | |
302 || AdminBean.Researcher.equals(role) | |
303 || AdminBean.Student.equals(role)) { | |
304 return true; | |
305 } | |
306 } | |
307 } | |
308 return false; | |
309 } | |
310 | |
311 public boolean isCanEdit() { | |
312 if (getUser() != null) { | |
313 String role = getUser().getRole(); | |
314 if (StringUtils.isNotEmpty(role)) { | |
315 if (AdminBean.Administrator.equals(role) | |
316 || AdminBean.Researcher.equals(role)) { | |
317 return true; | |
318 } | |
319 } | |
320 } | |
321 return false; | |
322 } | |
323 | |
324 public boolean isAdmin() { | |
325 if (getUser() != null) { | |
326 String role = getUser().getRole(); | |
327 if (StringUtils.isNotEmpty(role)) { | |
328 if (AdminBean.Administrator.equals(role)) { | |
329 return true; | |
330 } | |
331 } | |
332 } | |
333 return false; | |
334 } | |
335 | |
336 private List<String> generalMsgList = new ArrayList<String>(); | |
337 private List<String> errorMsgList = new ArrayList<String>(); | |
338 | |
339 public List<String> getErrorMsgList() { | |
340 return errorMsgList; | |
341 } | |
342 | |
343 public void setErrorMsgList(List<String> errorMsgList) { | |
344 this.errorMsgList = errorMsgList; | |
345 } | |
346 | |
347 public List<String> getGeneralMsgList() { | |
348 return generalMsgList; | |
349 } | |
350 | |
351 public void setGeneralMsgList(List<String> generalMsgList) { | |
352 this.generalMsgList = generalMsgList; | |
353 } | |
354 | |
355 public void addErrorMsg(String msg) { | |
356 if (this.errorMsgList == null) | |
357 this.errorMsgList = new ArrayList<String>(); | |
358 if (StringUtils.isNotEmpty(msg)) { | |
359 this.errorMsgList.add(msg); | |
360 } | |
361 } | |
362 | |
363 public void addGeneralMsg(String msg) { | |
364 if (this.generalMsgList == null) | |
365 this.generalMsgList = new ArrayList<String>(); | |
366 if (StringUtils.isNotEmpty(msg)) { | |
367 this.generalMsgList.add(msg); | |
368 } | |
369 } | |
370 | |
371 public void actionCloseErrorMsgDialog(ActionEvent event) { | |
372 this.errorMsgList = new ArrayList<String>(); | |
373 } | |
374 | |
375 public void actionCloseGeneralMsgDialog(ActionEvent event) { | |
376 this.generalMsgList = new ArrayList<String>(); | |
377 } | |
378 | |
379 protected SecurityService getSecurityService() { | |
380 return getAppBean().getSecurityService(); | |
381 } | |
382 | |
383 public void setSelectedTab(String tab) { | |
384 this.selectedTab = tab; | |
385 } | |
386 | |
387 public String closeErrorWindowAction() { | |
388 setDisplayError(false); | |
389 return "close_error"; | |
390 } | |
391 | |
392 public void editEntity(Long id) { | |
393 Entity entity = getWrapper().getEntityById(id); | |
394 this.editEntity(entity); | |
395 } | |
396 | |
397 public void editEntity(String id) { | |
398 try{ | |
399 Long entityId = Long.parseLong(id); | |
400 this.editEntity(entityId); | |
401 }catch (Exception e) { | |
402 e.printStackTrace(); | |
403 } | |
404 } | |
405 | |
406 public void editEntity(Entity entity) { | |
407 logger.info("[" + this.getUsername() + "] Edit Entity= " + entity); | |
408 | |
409 entity = getWrapper().getEntityContent(entity); | |
410 | |
411 this.editFormCurrentEntId = entity.getId(); | |
412 if (entity.getObjectClass().equals("WITNESS")) { | |
413 this.editWitness(entity); | |
414 selectedTab = WITNESS_TAB; | |
415 } else if (entity.getObjectClass().equals("TEXT")) { | |
416 this.editText(entity); | |
417 selectedTab = TEXT_TAB; | |
418 } else if (entity.getObjectClass().equals("REPOSITORY")) { | |
419 this.editRepository(entity); | |
420 selectedTab = REPOSITORY_TAB; | |
421 } else if (entity.getObjectClass().equals("PERSON")) { | |
422 this.editPerson(entity); | |
423 selectedTab = PERSON_TAB; | |
424 } else if (entity.getObjectClass().equals("COLLECTION")) { | |
425 this.editCollection(entity); | |
426 selectedTab = COLLECTION_TAB; | |
427 } else if (entity.getObjectClass().equals("CODEX")) { | |
428 this.editCodex(entity); | |
429 selectedTab = CODEX_TAB; | |
430 } else if (entity.getObjectClass().equals("PLACE")) { | |
431 this.editPlace(entity); | |
432 selectedTab = CITY_TAB; | |
433 } else if (entity.getObjectClass().equals("ALIAS")) { | |
434 this.editAlias(entity); | |
435 selectedTab = ALIAS_TAB; | |
436 } else if (entity.getObjectClass().equals("SUBJECT")) { | |
437 this.editSubject(entity); | |
438 selectedTab = SUBJECT_TAB; | |
439 } else if (entity.getObjectClass().equals("ROLE")) { | |
440 this.editRole(entity); | |
441 selectedTab = ROLE_TAB; | |
442 } else if (entity.getObjectClass().equals("DIGITALIZATION")) { | |
443 this.editDigi(entity); | |
444 selectedTab = DIGI_TAB; | |
445 } else if (entity.getObjectClass().equals(StudyEvent.OC)) { | |
446 this.editWitnessStudyEvent(entity); | |
447 selectedEventTab = WITNESS_STUDY_EVENT_TAB; | |
448 } else if (entity.getObjectClass().equals(CopyEvent.OC)) { | |
449 this.editCopyEvent(entity); | |
450 selectedEventTab = COPY_EVENT_TAB; | |
451 } else if (entity.getObjectClass().equals(TransferEvent.OC)) { | |
452 this.editTransferEvent(entity); | |
453 selectedEventTab = TRANSFER_EVENT_TAB; | |
454 } else { | |
455 addErrorMsg("Form not implemented for these entities [" + entity.getObjectClass() + "]"); | |
456 } | |
457 } | |
458 | |
459 //*************************** | |
460 //*************************** | |
461 //*************************** | |
462 //*************************** | |
463 //*************************** | |
464 private void editText(Entity text) { | |
465 CurrentTextBean bean = (CurrentTextBean)getSessionBean(ApplicationBean.CURRENT_TEXT); | |
466 if(bean == null){ | |
467 bean = new CurrentTextBean(); | |
468 addSessionBean(ApplicationBean.CURRENT_TEXT, bean); | |
469 } | |
470 try { | |
471 bean.setEntity(text); | |
472 } catch (Exception e) { | |
473 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
474 } | |
475 } | |
476 | |
477 private void editRepository(Entity repository) { | |
478 CurrentRepositoryBean bean = (CurrentRepositoryBean)getSessionBean(ApplicationBean.CURRENT_REPOSITORY); | |
479 if(bean == null){ | |
480 bean = new CurrentRepositoryBean(); | |
481 addSessionBean(ApplicationBean.CURRENT_REPOSITORY, bean); | |
482 } | |
483 try { | |
484 bean.setEntity(repository); | |
485 } catch (Exception e) { | |
486 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
487 } | |
488 } | |
489 | |
490 private void editPerson(Entity person) { | |
491 CurrentPersonBean bean = (CurrentPersonBean)getSessionBean(ApplicationBean.CURRENT_PERSON); | |
492 if(bean == null){ | |
493 bean = new CurrentPersonBean(); | |
494 addSessionBean(ApplicationBean.CURRENT_PERSON, bean); | |
495 } | |
496 try { | |
497 bean.setEntity(person); | |
498 } catch (Exception e) { | |
499 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
500 } | |
501 } | |
502 | |
503 private void editCollection(Entity collection) { | |
504 CurrentCollectionBean bean = (CurrentCollectionBean) getSessionBean(ApplicationBean.CURRENT_COLLECTION); | |
505 if (bean == null) { | |
506 bean = new CurrentCollectionBean(); | |
507 addSessionBean(ApplicationBean.CURRENT_COLLECTION, bean); | |
508 } | |
509 try { | |
510 bean.setEntity(collection); | |
511 } catch (Exception e) { | |
512 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
513 } | |
514 } | |
515 | |
516 private void editCodex(Entity codex) { | |
517 CurrentCodexBean bean = (CurrentCodexBean) getSessionBean(ApplicationBean.CURRENT_CODEX); | |
518 if (bean == null) { | |
519 bean = new CurrentCodexBean(); | |
520 addSessionBean(ApplicationBean.CURRENT_CODEX, bean); | |
521 } | |
522 try { | |
523 bean.setEntity(codex); | |
524 } catch (Exception e) { | |
525 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
526 } | |
527 } | |
528 | |
529 private void editPlace(Entity place) { | |
530 CurrentCityBean bean = (CurrentCityBean) getSessionBean(ApplicationBean.CURRENT_CITY); | |
531 if (bean == null) { | |
532 bean = new CurrentCityBean(); | |
533 addSessionBean(ApplicationBean.CURRENT_CITY, bean); | |
534 } | |
535 try { | |
536 bean.setEntity(place); | |
537 } catch (Exception e) { | |
538 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
539 } | |
540 } | |
541 | |
542 private void editAlias(Entity alias) { | |
543 CurrentAliasBean bean = (CurrentAliasBean) getSessionBean(ApplicationBean.CURRENT_ALIAS); | |
544 if (bean == null) { | |
545 bean = new CurrentAliasBean(); | |
546 addSessionBean(ApplicationBean.CURRENT_ALIAS, bean); | |
547 } | |
548 try { | |
549 bean.setEntity(alias); | |
550 } catch (Exception e) { | |
551 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
552 } | |
553 } | |
554 | |
555 private void editSubject(Entity subject) { | |
556 CurrentSubjectBean bean = (CurrentSubjectBean) getSessionBean(ApplicationBean.CURRENT_SUBJECT); | |
557 if (bean == null) { | |
558 bean = new CurrentSubjectBean(); | |
559 addSessionBean(ApplicationBean.CURRENT_SUBJECT, bean); | |
560 } | |
561 try { | |
562 bean.setEntity(subject); | |
563 } catch (Exception e) { | |
564 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
565 } | |
566 } | |
567 | |
568 private void editRole(Entity role) { | |
569 CurrentRoleBean bean = (CurrentRoleBean) getSessionBean(ApplicationBean.CURRENT_ROLE); | |
570 if (bean == null) { | |
571 bean = new CurrentRoleBean(); | |
572 addSessionBean(ApplicationBean.CURRENT_ROLE, bean); | |
573 } | |
574 try { | |
575 bean.setEntity(role); | |
576 } catch (Exception e) { | |
577 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
578 } | |
579 } | |
580 | |
581 | |
582 private void editDigi(Entity digi) { | |
583 CurrentDigitalizationBean bean = (CurrentDigitalizationBean) getSessionBean(ApplicationBean.CURRENT_DIGI); | |
584 if (bean == null) { | |
585 bean = new CurrentDigitalizationBean(); | |
586 addSessionBean(ApplicationBean.CURRENT_DIGI, bean); | |
587 } | |
588 try { | |
589 bean.setEntity(digi); | |
590 } catch (Exception e) { | |
591 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
592 } | |
593 } | |
594 | |
595 | |
596 | |
597 private void editWitness(Entity witness) { | |
598 CurrentWitnessBean bean = (CurrentWitnessBean) getSessionBean(ApplicationBean.CURRENT_WITNESS); | |
599 if (bean == null) { | |
600 bean = new CurrentWitnessBean(); | |
601 addSessionBean(ApplicationBean.CURRENT_WITNESS, bean); | |
602 } | |
603 try { | |
604 bean.setEntity(witness); | |
605 } catch (Exception e) { | |
606 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
607 } | |
608 } | |
609 | |
610 private void editWitnessStudyEvent(Entity event){ | |
611 this.studyEventForm = new StudyEvent(event); | |
612 } | |
613 | |
614 public void listenerCreateStudyEvent(ActionEvent event){ | |
615 this.studyEventForm = new StudyEvent(); | |
616 } | |
617 | |
618 private void editCopyEvent(Entity event){ | |
619 this.copyEventForm = new CopyEvent(event); | |
620 } | |
621 | |
622 public void listenerCreateCopyEvent(ActionEvent event){ | |
623 this.copyEventForm = new CopyEvent(); | |
624 } | |
625 | |
626 private void editTransferEvent(Entity event){ | |
627 this.transferEventForm = new TransferEvent(event); | |
628 } | |
629 | |
630 public void listenerCreateTransferEvent(ActionEvent event){ | |
631 this.transferEventForm = new TransferEvent(); | |
632 } | |
633 | |
634 | |
635 public Long getEditFormCurrentEntId() { | |
636 return editFormCurrentEntId; | |
637 } | |
638 | |
639 public void setEditFormCurrentEntId(Long editFormCurrentEntId) { | |
640 this.editFormCurrentEntId = editFormCurrentEntId; | |
641 } | |
642 | |
643 | |
644 public void updateCurrent(ItemChangeEvent event) { | |
119 | 645 //System.out.println(event.getNewItemName()); |
1 | 646 } |
647 | |
648 public void listenerEntityTabChange(ItemChangeEvent event) { | |
649 String url = "?formIndex=" + this.selectedTab; | |
650 this.redirect(null, url); | |
651 } | |
652 | |
653 public void listenerEventTabChange(ItemChangeEvent event) { | |
654 String url = "?formIndex=" + this.selectedEventTab; | |
655 this.redirect(null, url); | |
656 } | |
657 | |
658 public void listenerAdvancedSearchTabChange(ItemChangeEvent event) { | |
659 String url = "?searchForm=" + this.selectedAdvancedSearchTab; | |
660 this.redirect(null, url); | |
661 } | |
662 | |
153
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
663 public void listenerPublicByAuthorTabChange(ItemChangeEvent event) { |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
664 String url = "?formIndex=" + this.selectedPublicByAuthorTab; |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
665 this.redirect(null, url); |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
666 } |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
667 |
180
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
668 public void listenerMissingRelationsTabChange(ItemChangeEvent event) { |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
669 String url = "?formIndex=" + this.selectedMissingRelationsTab; |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
670 this.redirect(null, url); |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
671 } |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
672 |
1 | 673 protected void redirect(String redirectPath, String parameters){ |
674 FacesContext fc = FacesContext.getCurrentInstance(); | |
675 ExternalContext ec = fc.getExternalContext(); | |
676 String contextPath = ec.getRequestContextPath(); | |
677 if(StringUtils.isEmpty(redirectPath)){ | |
678 redirectPath = ec.getRequestServletPath(); | |
679 } | |
680 try { | |
681 ec.redirect(ec.encodeActionURL(contextPath + redirectPath + parameters)); | |
682 | |
683 } catch (IOException e) { | |
684 e.printStackTrace(); | |
685 } | |
686 } | |
687 | |
688 public Entity getDefinition(Entity assertion) { | |
689 return getWrapper().getDefinition(assertion.getObjectClass()); | |
690 } | |
691 | |
692 public String toProfile(){ | |
693 return PAGE_PROFILE; | |
694 } | |
695 | |
696 public String toSimpleSearch() { | |
697 return PAGE_SIMPLE_SEARCH; | |
698 } | |
699 | |
700 public String toDefinitionEditor(){ | |
701 if(this.defForm != null){ | |
702 this.defForm.loadDefinitions(); | |
703 return PAGE_DEF_EDITOR; | |
704 } | |
705 return ""; | |
706 } | |
707 | |
708 public String displayByAttribute() { | |
709 Attribute att = (Attribute) getRequestBean("attribute"); | |
710 logger.info(att); | |
711 if (att != null) { | |
712 Entity ent = getWrapper().getEntityById(att.getSourceId()); | |
713 if (ent.getObjectClass().equals("TEXT")) { | |
714 this.displayTitle.showTitle(ent.getId()); | |
715 return PAGE_DISPLAY_TITLE; | |
716 } else if (ent.getObjectClass().equals("PERSON")) { | |
717 this.displayAuthor.showAuthor(ent.getId()); | |
718 return PAGE_DISPLAY_AUTHOR; | |
719 } | |
720 } | |
721 | |
722 return ""; | |
723 } | |
724 | |
725 public void displayAuthorSetPerson(String personId){ | |
726 try{ | |
727 Long id = new Long(personId); | |
728 Entity person = getWrapper().getEntityById(id); | |
729 if(person != null){ | |
730 person = getWrapper().getEntityContent(person); | |
731 if (person.getObjectClass().equals("PERSON")) { | |
732 this.displayAuthor.showAuthor(person.getId()); | |
733 } | |
734 } | |
735 }catch(Exception e){ | |
736 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
737 } | |
738 } | |
739 | |
740 public void displayAuthorSetTitle(String textId){ | |
741 try{ | |
742 Long id = new Long(textId); | |
743 this.displayAuthor.showTitle(id); | |
744 }catch(Exception e){ | |
745 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
746 } | |
747 } | |
748 | |
749 public void displayAuthorSetWitness(String witnessId){ | |
750 try{ | |
751 Long id = new Long(witnessId); | |
752 this.displayAuthor.showWitness(id); | |
753 }catch(Exception e){ | |
754 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
755 } | |
756 } | |
757 | |
758 public void displayTitleSetTitle(String textId){ | |
759 try{ | |
760 Long id = new Long(textId); | |
761 Entity ent = getWrapper().getEntityById(id); | |
762 if(ent != null){ | |
763 ent = getWrapper().getEntityContent(ent); | |
764 if (ent.getObjectClass().equals("TEXT")) { | |
765 //this.editText(ent); | |
766 this.displayTitle.showTitle(id); | |
767 } | |
768 } | |
769 }catch(Exception e){ | |
770 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
771 } | |
772 } | |
773 | |
774 public void displayTitleSetWitness(String witnessId){ | |
775 try{ | |
776 Long id = new Long(witnessId); | |
777 this.displayTitle.showWitness(id); | |
778 | |
779 }catch(Exception e){ | |
780 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
781 } | |
782 } | |
783 | |
784 public void displayTitleFromWitness(String witnessId){ | |
785 try{ | |
786 Long longWitnessId = new Long(witnessId); | |
787 | |
788 List<Entity> textList = | |
789 getWrapper().getTargetsForSourceRelation(longWitnessId, "is_exemplar_of", "TEXT", 1); | |
790 if(textList.size() > 0){ | |
791 this.displayTitle.showTitle(textList.get(0).getId()); | |
792 this.displayTitle.showWitness(longWitnessId); | |
793 } | |
794 | |
795 }catch(Exception e){ | |
796 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
797 } | |
798 } | |
799 | |
800 public void displayAuthorFromWitness(String witnessId){ | |
801 try{ | |
802 Long longWitnessId = new Long(witnessId); | |
803 | |
804 List<Entity> titleList = | |
805 getWrapper().getTargetsForSourceRelation(longWitnessId, "is_exemplar_of", "TEXT", 1); | |
806 if(titleList.size() > 0){ | |
807 Entity title = titleList.get(0); | |
808 List<Entity> authorList = | |
809 getWrapper().getTargetsForSourceRelation(title.getId(), "was_created_by", "PERSON", 1); | |
810 if(authorList.size() > 0){ | |
811 this.displayAuthor.showAuthor(authorList.get(0).getId()); | |
812 this.displayAuthor.showTitle(title.getId()); | |
813 this.displayAuthor.showWitness(longWitnessId); | |
814 } | |
815 } | |
816 | |
817 }catch(Exception e){ | |
818 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
819 } | |
820 } | |
821 | |
822 public void displayAuthorFromTitles(String titleId){ | |
823 try{ | |
824 Long longTitleId = new Long(titleId); | |
825 | |
826 List<Entity> authorList = | |
827 getWrapper().getTargetsForSourceRelation(longTitleId, "was_created_by", "PERSON", 1); | |
828 if(authorList.size() > 0){ | |
829 this.displayAuthor.showAuthor(authorList.get(0).getId()); | |
830 this.displayAuthor.showTitle(longTitleId); | |
831 } | |
832 | |
833 }catch(Exception e){ | |
834 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
835 } | |
836 } | |
837 | |
838 | |
839 public String editByAttribute() { | |
840 Attribute att = (Attribute) getRequestBean("attribute"); | |
841 logger.info(att); | |
842 if (att != null) { | |
843 Entity ent = getWrapper().getEntityById(att.getSourceId()); | |
844 if (ent != null) { | |
845 this.editEntity(ent); | |
846 return PAGE_ENTRY; | |
847 } | |
848 } | |
849 | |
850 return ""; | |
851 } | |
852 | |
853 public void setIdEntityDetails(String id){ | |
854 try{ | |
855 Long idLong = new Long(id); | |
856 Entity e = getWrapper().getEntityById(idLong); | |
857 this.entDetailsForm.setEntity(e); | |
858 }catch(Exception e){ | |
859 logger.error("[U=" + this.getUsername() + "]" + e.getMessage(), e); | |
860 } | |
861 } | |
862 | |
863 public String editByEntity() { | |
864 Entity ent = (Entity) getRequestBean("entity"); | |
865 if (ent != null) { | |
866 if (ent != null) { | |
867 this.editEntity(ent); | |
868 return PAGE_ENTRY; | |
869 } | |
870 } | |
871 return ""; | |
872 } | |
873 | |
874 public void setErrorMessages(CheckResults cr) { | |
875 | |
876 errorMessages = new ArrayList<String>(); | |
877 for (String err : cr.errors) { | |
878 errorMessages.add(err); | |
879 } | |
880 | |
881 } | |
882 | |
883 public void setDisplayError(boolean b) { | |
884 displayError = b; | |
885 | |
886 } | |
887 | |
888 public boolean getDisplayError() { | |
889 return displayError; | |
890 } | |
891 | |
892 public ArrayList<String> getErrorMessages() { | |
893 return errorMessages; | |
894 } | |
895 | |
896 public User getUser() { | |
897 if(user == null){ | |
898 autoLogin(); | |
899 } | |
900 return user; | |
901 } | |
902 | |
903 public void setUser(User user) { | |
904 this.user = user; | |
905 } | |
906 | |
907 public String getUsername() { | |
908 return username; | |
909 } | |
910 | |
911 public void setUsername(String username) { | |
912 this.username = username; | |
913 } | |
914 | |
915 public String getPassword() { | |
916 return password; | |
917 } | |
918 | |
919 public void setPassword(String password) { | |
920 this.password = password; | |
921 } | |
922 | |
923 public GeneralMerge getGeneralMerge() { | |
924 return generalMerge; | |
925 } | |
926 | |
927 public void setGeneralMerge(GeneralMerge generalMerge) { | |
928 this.generalMerge = generalMerge; | |
929 } | |
930 | |
85 | 931 public ReferenceMerge getReferenceMerge() { |
932 return referenceMerge; | |
933 } | |
934 | |
935 public void setReferenceMerge(ReferenceMerge referenceMerge) { | |
936 this.referenceMerge = referenceMerge; | |
937 } | |
938 | |
96 | 939 /** |
940 * @return the importMerge | |
941 */ | |
942 public ImportMerge getImportMerge() { | |
943 return importMerge; | |
944 } | |
945 | |
946 /** | |
947 * @param importMerge the importMerge to set | |
948 */ | |
949 public void setImportMerge(ImportMerge importMerge) { | |
950 this.importMerge = importMerge; | |
951 } | |
952 | |
953 public DefinitionForm getDefForm() { | |
1 | 954 return defForm; |
955 } | |
956 | |
957 public void setDefForm(DefinitionForm defForm) { | |
958 this.defForm = defForm; | |
959 } | |
960 | |
961 public StudyEvent getStudyEventForm() { | |
962 return studyEventForm; | |
963 } | |
964 | |
965 public void setStudyEventForm(StudyEvent studyEventForm) { | |
966 this.studyEventForm = studyEventForm; | |
967 } | |
968 | |
969 public CopyEvent getCopyEventForm() { | |
970 return copyEventForm; | |
971 } | |
972 | |
973 public void setCopyEventForm(CopyEvent copyEventForm) { | |
974 this.copyEventForm = copyEventForm; | |
975 } | |
976 | |
977 public TransferEvent getTransferEventForm() { | |
978 return transferEventForm; | |
979 } | |
980 | |
981 public void setTransferEventForm(TransferEvent transferEventForm) { | |
982 this.transferEventForm = transferEventForm; | |
983 } | |
984 | |
985 public String getSelectedEventTab() { | |
986 return selectedEventTab; | |
987 } | |
988 | |
989 public void setSelectedEventTab(String selectedEventTab) { | |
990 this.selectedEventTab = selectedEventTab; | |
991 } | |
992 | |
993 public AdvancedSearchBean getAdvancedSearch() { | |
994 return advancedSearch; | |
995 } | |
996 | |
997 public void setAdvancedSearch(AdvancedSearchBean advancedSearch) { | |
998 this.advancedSearch = advancedSearch; | |
999 } | |
1000 | |
1001 public DisplayAuthorBean getDisplayAuthor() { | |
1002 return displayAuthor; | |
1003 } | |
1004 | |
1005 public void setDisplayAuthor(DisplayAuthorBean displayAuthor) { | |
1006 this.displayAuthor = displayAuthor; | |
1007 } | |
1008 | |
1009 public DisplayTitleBean getDisplayTitle() { | |
1010 return displayTitle; | |
1011 } | |
1012 | |
1013 public void setDisplayTitle(DisplayTitleBean displayTitle) { | |
1014 this.displayTitle = displayTitle; | |
1015 } | |
1016 | |
1017 public Calendar getCurrentCalendar() { | |
1018 return currentCalendar; | |
1019 } | |
1020 | |
1021 public void setCurrentCalendar(Calendar currentCalendar) { | |
1022 this.currentCalendar = currentCalendar; | |
1023 } | |
1024 | |
1025 public EntityList getCurrentEntListForCalendar() { | |
1026 return currentEntListForCalendar; | |
1027 } | |
1028 | |
1029 public void setCurrentEntListForCalendar(EntityList currentEntListForCalendar) { | |
1030 this.currentEntListForCalendar = currentEntListForCalendar; | |
1031 } | |
1032 | |
1033 public Long getCurrentEntIdForCalendar() { | |
1034 return currentEntIdForCalendar; | |
1035 } | |
1036 | |
1037 public void setCurrentEntIdForCalendar(Long currentEntIdForCalendar) { | |
1038 this.currentEntIdForCalendar = currentEntIdForCalendar; | |
1039 } | |
1040 | |
1041 public boolean isDisplayLoginDialog() { | |
1042 return displayLoginDialog; | |
1043 } | |
1044 | |
1045 public boolean isDisplayLoginDialog4PrivatePage(){ | |
1046 return displayLoginDialog || this.user == null; | |
1047 } | |
1048 | |
1049 public boolean isDisplayLoginDialog4PublicPage(){ | |
1050 return displayLoginDialog; | |
1051 } | |
1052 | |
1053 public EntityDetailsBean getEntDetailsForm() { | |
1054 return entDetailsForm; | |
1055 } | |
1056 | |
1057 public void setEntDetailsForm(EntityDetailsBean entDetailsForm) { | |
1058 this.entDetailsForm = entDetailsForm; | |
1059 } | |
1060 | |
1061 public String getSelectedTab() { | |
1062 return selectedTab; | |
1063 } | |
1064 | |
1065 public String getSelectedAdvancedSearchTab() { | |
1066 return selectedAdvancedSearchTab; | |
1067 } | |
1068 | |
1069 public void setSelectedAdvancedSearchTab(String selectedAdvancedSearchTab) { | |
1070 this.selectedAdvancedSearchTab = selectedAdvancedSearchTab; | |
1071 } | |
1072 | |
1073 | |
1074 public DynamicPageEditor getPageEditor(){ | |
1075 if(this.pageEditor == null){ | |
1076 this.pageEditor = new DynamicPageEditor(); | |
1077 } | |
1078 return this.pageEditor; | |
1079 } | |
1080 | |
1081 public DigiListBean getDigiList() { | |
1082 if(digiList == null){ | |
1083 digiList = new DigiListBean(getWrapper()); | |
1084 } | |
1085 | |
1086 return digiList; | |
1087 } | |
1088 | |
1089 public DynamicPage getDynamicPage() { | |
1090 if(dynamicPage == null){ | |
1091 this.dynamicPage = new DynamicPage(); | |
1092 } | |
1093 return dynamicPage; | |
1094 } | |
1095 | |
1096 public void setDynamicPage(DynamicPage dynamicPage) { | |
1097 this.dynamicPage = dynamicPage; | |
1098 } | |
1099 | |
1100 public PublicCodexView getPublicCodexView(){ | |
1101 if(publicCodexView == null){ | |
1102 this.publicCodexView = new PublicCodexView(); | |
1103 } | |
1104 return this.publicCodexView; | |
1105 } | |
1106 | |
1107 public PublicCodexBean getPublicCodexBean() { | |
1108 if(publicCodexBean == null){ | |
1109 this.publicCodexBean = new PublicCodexBean(); | |
1110 } | |
1111 return publicCodexBean; | |
1112 } | |
1113 | |
1114 public void setPublicCodexBean(PublicCodexBean publicCodexBean) { | |
1115 this.publicCodexBean = publicCodexBean; | |
1116 } | |
153
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1117 |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1118 /** |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1119 * @return the publicByAuthor |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1120 */ |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1121 public PublicByAuthorBean getPublicByAuthor() { |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1122 return publicByAuthor; |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1123 } |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1124 |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1125 /** |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1126 * @param publicByAuthor the publicByAuthor to set |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1127 */ |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1128 public void setPublicByAuthor(PublicByAuthorBean publicByAuthor) { |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1129 this.publicByAuthor = publicByAuthor; |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1130 } |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1131 |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1132 /** |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1133 * @return the selectedPublicByAuthorTab |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1134 */ |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1135 public String getSelectedPublicByAuthorTab() { |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1136 return selectedPublicByAuthorTab; |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1137 } |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1138 |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1139 /** |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1140 * @param selectedPublicByAuthorTab the selectedPublicByAuthorTab to set |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1141 */ |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1142 public void setSelectedPublicByAuthorTab(String selectedPublicByAuthorTab) { |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1143 this.selectedPublicByAuthorTab = selectedPublicByAuthorTab; |
3c83f42a8a39
first stab at new public-by-author interface.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
119
diff
changeset
|
1144 } |
180
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
1145 |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
1146 public MissingRelationsBean getMissingRelations() { |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
1147 return missingRelations; |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
1148 } |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
1149 |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
1150 public void setMissingRelations(MissingRelationsBean missingRelations) { |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
1151 this.missingRelations = missingRelations; |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
1152 } |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
1153 |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
1154 public String getSelectedMissingRelationsTab() { |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
1155 return selectedMissingRelationsTab; |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
1156 } |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
1157 |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
1158 public void setSelectedMissingRelationsTab(String selectedMissingRelationsTab) { |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
1159 this.selectedMissingRelationsTab = selectedMissingRelationsTab; |
0d31c8be7c31
new MissingRelations feature and UI.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
178
diff
changeset
|
1160 } |
1 | 1161 |
1162 | |
1163 | |
1164 } | |
1165 |