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