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

Public Member Functions

 IssueRelation (IssuePredecessor predecessor, Issue issue)
 
Issue getIssue ()
 
IssuePredecessor getPredecessor ()
 
List< IssueRelationgetRelatedChildren ()
 
IssueRelation getRelatedParent ()
 
void reloadRelated ()
 
void reloadParent ()
 
void reloadTree ()
 
void doAddRelation (final Changes changes) throws InterruptedException
 
void doEditRelation (final Changes changes) throws InterruptedException
 
void doDeleteRelation () throws InterruptedException
 
boolean canDelete ()
 
boolean canEdit ()
 

Detailed Description

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

Definition at line 49 of file IssueRelation.java.

Constructor & Destructor Documentation

◆ IssueRelation()

org.turro.dossier.zul.relation.IssueRelation.IssueRelation ( IssuePredecessor  predecessor,
Issue  issue 
)

Definition at line 55 of file IssueRelation.java.

55  {
56  this.predecessor = predecessor;
57  this.issue = issue;
58  initLoadOnDemand();
59  addCells();
60  addChildrenSpace();
61  addTargets();
62  }

Member Function Documentation

◆ canDelete()

boolean org.turro.dossier.zul.relation.IssueRelation.canDelete ( )

Definition at line 146 of file IssueRelation.java.

146  {
147  return predecessor != null;
148  }

◆ canEdit()

boolean org.turro.dossier.zul.relation.IssueRelation.canEdit ( )

Definition at line 150 of file IssueRelation.java.

150  {
151  return predecessor != null;
152  }

◆ doAddRelation()

void org.turro.dossier.zul.relation.IssueRelation.doAddRelation ( final Changes  changes) throws InterruptedException

Definition at line 99 of file IssueRelation.java.

99  {
100  final IssuePredecessor ip = new IssuePredecessor();
101  ip.setTarget(issue);
102  ip.setType(IssuePredecessorType.START_WHEN_ENDS);
103  getDesktop().setAttribute("predecessor", ip);
104 
105  Modal.doModal("/WEB-INF/_zul/issue/relation.zul", new Command() {
106  @Override
107  public Object execute(Context context) {
108  if(checkRelation(ip)) {
109  predecessor = new DossierPU().saveObject(ip);
110  reloadTree();
111  if(changes != null) {
112  ChangeCategory cc = new ChangeCategory(3, I_.get("Relations"));
113  changes.addChange(new UniqueString(cc, "", "+" + getPredecessor().getFullDescription()));
114  }
115  }
116  return null;
117  }
118  });
119  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ doDeleteRelation()

void org.turro.dossier.zul.relation.IssueRelation.doDeleteRelation ( ) throws InterruptedException

Definition at line 139 of file IssueRelation.java.

139  {
140  Messages.confirmDeletion().show(() -> {
141  new DossierPU().deleteObject(predecessor);
142  reloadTree();
143  });
144  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ doEditRelation()

void org.turro.dossier.zul.relation.IssueRelation.doEditRelation ( final Changes  changes) throws InterruptedException

Definition at line 121 of file IssueRelation.java.

121  {
122  getDesktop().setAttribute("predecessor", predecessor);
123  Modal.doModal("/WEB-INF/_zul/issue/relation.zul", new Command() {
124  @Override
125  public Object execute(Context context) {
126  if(checkRelation(predecessor)) {
127  predecessor = new DossierPU().saveObject(predecessor);
128  reloadParent();
129  if(changes != null) {
130  ChangeCategory cc = new ChangeCategory(3, I_.get("Relations"));
131  changes.addChange(new UniqueString(cc, "", getPredecessor().getFullDescription()));
132  }
133  }
134  return null;
135  }
136  });
137  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getIssue()

Issue org.turro.dossier.zul.relation.IssueRelation.getIssue ( )

Definition at line 64 of file IssueRelation.java.

64  {
65  return issue;
66  }
Here is the caller graph for this function:

◆ getPredecessor()

IssuePredecessor org.turro.dossier.zul.relation.IssueRelation.getPredecessor ( )

Definition at line 68 of file IssueRelation.java.

68  {
69  return predecessor;
70  }
Here is the caller graph for this function:

◆ getRelatedChildren()

List<IssueRelation> org.turro.dossier.zul.relation.IssueRelation.getRelatedChildren ( )

Definition at line 72 of file IssueRelation.java.

72  {
73  return CollectionUtil.from(children.getChildren()).<List<IssueRelation>>cast();
74  }

◆ getRelatedParent()

IssueRelation org.turro.dossier.zul.relation.IssueRelation.getRelatedParent ( )

Definition at line 76 of file IssueRelation.java.

76  {
77  Component comp = getParent().getParent();
78  return (IssueRelation) (comp instanceof IssueRelation ? comp : null);
79  }
IssueRelation(IssuePredecessor predecessor, Issue issue)
Here is the caller graph for this function:

◆ reloadParent()

void org.turro.dossier.zul.relation.IssueRelation.reloadParent ( )

Definition at line 87 of file IssueRelation.java.

87  {
88  if(getRelatedParent() == null) {
89  reloadTree();
90  } else {
92  }
93  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reloadRelated()

void org.turro.dossier.zul.relation.IssueRelation.reloadRelated ( )

Definition at line 81 of file IssueRelation.java.

81  {
82  removeChild(children);
83  addChildrenSpace();
84  addTargets();
85  }
Here is the caller graph for this function:

◆ reloadTree()

void org.turro.dossier.zul.relation.IssueRelation.reloadTree ( )

Definition at line 95 of file IssueRelation.java.

95  {
96  ((IssueRelationTree) getTree()).setIssue(((IssueRelationTree) getTree()).getIssue());
97  }
Here is the call graph for this function:
Here is the caller graph for this function:

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