BrightSide Workbench Full Report + Source Code
org.turro.dossier.zul.issue.IssueComposer Class Reference
Inheritance diagram for org.turro.dossier.zul.issue.IssueComposer:
Collaboration diagram for org.turro.dossier.zul.issue.IssueComposer:

Public Member Functions

void onAddInfo ()
 
void onAddSub ()
 
void afterSave ()
 
- Public Member Functions inherited from org.turro.jpa.composer.EntityComposer< E, ID >
final void onChange (Event event)
 
final void onSave ()
 
final void onDelete ()
 
Object getEntity ()
 
Object getWrapper ()
 
void doBeforeComposeChildren (Component comp) throws Exception
 
void doFinally () throws Exception
 
void doAfterCompose (Component comp) throws Exception
 

Protected Member Functions

String getAttributeName ()
 
Issue getEntityInstance (Long id)
 
DaoEntity getWrapperInstance (Component comp)
 
boolean shouldBeSaved ()
 
boolean inSaveRole ()
 
boolean inDeleteRole ()
 
- Protected Member Functions inherited from org.turro.jpa.composer.EntityComposer< E, ID >
abstract E getEntityInstance (ID id)
 
void doOnSave ()
 
boolean beforeSave ()
 
void doOnDelete ()
 
boolean beforeDelete ()
 
void afterDelete ()
 
void doOnChange ()
 
boolean hasChanged ()
 
void retrieveEntity ()
 
boolean canClose ()
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.jpa.composer.EntityComposer< E, ID >
entity
 
DaoEntity wrapper
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 44 of file IssueComposer.java.

Member Function Documentation

◆ afterSave()

void org.turro.dossier.zul.issue.IssueComposer.afterSave ( )

Reimplemented from org.turro.jpa.composer.EntityComposer< E, ID >.

Definition at line 104 of file IssueComposer.java.

104  {
105  if(entity != null) {
106  DossierMenu.showIssue(entity.getId());
107  }
108  }
Here is the call graph for this function:

◆ getAttributeName()

String org.turro.dossier.zul.issue.IssueComposer.getAttributeName ( )
protected

Reimplemented from org.turro.jpa.composer.EntityComposer< E, ID >.

Definition at line 71 of file IssueComposer.java.

71  {
72  return "issue";
73  }

◆ getEntityInstance()

Issue org.turro.dossier.zul.issue.IssueComposer.getEntityInstance ( Long  id)
protected

Definition at line 76 of file IssueComposer.java.

76  {
77  if(id == null) {
78  entity = new Issue();
79  Long dossierId = (Long) Executions.getCurrent().getDesktop().getAttribute("dossierId");
80  if(dossierId != null && dossierId > 0) {
81  entity.setDossier(new DossierPU().find(Dossier.class, dossierId));
82  }
83  entity.setType(IssueType.TYPE_TASK);
84  entity.setStatus(IssueStatus.STATUS_NEW);
85  entity.setPriority(IssuePriority.PRIORITY_HAS_WORKAROUND);
86  entity.setResolution(IssueResolution.RESOLUTION_FIXED);
87  entity.setIssueDate(new java.util.Date());
88  entity.setPublishable(true);
89  } else {
90  entity = new DossierPU().find(Issue.class, id);
91  }
92  return entity;
93  }

◆ getWrapperInstance()

DaoEntity org.turro.dossier.zul.issue.IssueComposer.getWrapperInstance ( Component  comp)
protected

Reimplemented from org.turro.jpa.composer.EntityComposer< E, ID >.

Definition at line 96 of file IssueComposer.java.

96  {
97  IssueWrapper w = new IssueWrapper(entity);
98  Framework.getCurrent().setSelectedLabel(w.getTabLabel());
99  Framework.getCurrent().setSelectedTooltiptext(w.getTooltiptext());
100  return w;
101  }
Here is the call graph for this function:

◆ inDeleteRole()

boolean org.turro.dossier.zul.issue.IssueComposer.inDeleteRole ( )
protected

Reimplemented from org.turro.jpa.composer.EntityComposer< E, ID >.

Definition at line 121 of file IssueComposer.java.

121  {
122  return Application.getApplication().isInRole("issue:delete");
123  }
Here is the call graph for this function:

◆ inSaveRole()

boolean org.turro.dossier.zul.issue.IssueComposer.inSaveRole ( )
protected

Reimplemented from org.turro.jpa.composer.EntityComposer< E, ID >.

Definition at line 116 of file IssueComposer.java.

116  {
117  return Application.getApplication().isInRole("issue:edit");
118  }
Here is the call graph for this function:

◆ onAddInfo()

void org.turro.dossier.zul.issue.IssueComposer.onAddInfo ( )

Definition at line 47 of file IssueComposer.java.

47  {
48  DossierMenu.addInformation(entity, new Command() {
49  @Override
50  public Object execute(Context context) {
51  Framework.getCurrent().closeSelected();
52  DossierMenu.showIssue(entity.getId());
53  return null;
54  }
55  });
56  }
Here is the call graph for this function:

◆ onAddSub()

void org.turro.dossier.zul.issue.IssueComposer.onAddSub ( )

Definition at line 59 of file IssueComposer.java.

59  {
60  DossierMenu.addSubtask(entity, new Command() {
61  @Override
62  public Object execute(Context context) {
63  Framework.getCurrent().closeSelected();
64  DossierMenu.showIssue(entity.getId());
65  return null;
66  }
67  });
68  }
Here is the call graph for this function:

◆ shouldBeSaved()

boolean org.turro.dossier.zul.issue.IssueComposer.shouldBeSaved ( )
protected

Reimplemented from org.turro.jpa.composer.EntityComposer< E, ID >.

Definition at line 111 of file IssueComposer.java.

111  {
112  return false;
113  }

The documentation for this class was generated from the following file: