BrightSide Workbench Full Report + Source Code
org.turro.erp.task.logic.TaskComposer Class Reference
Inheritance diagram for org.turro.erp.task.logic.TaskComposer:
Collaboration diagram for org.turro.erp.task.logic.TaskComposer:

Public Member Functions

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 ()
 
Task getEntityInstance (Long id)
 
DaoEntity getWrapperInstance (Component comp)
 
void doOnDelete ()
 
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 ()
 
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 37 of file TaskComposer.java.

Member Function Documentation

◆ afterSave()

void org.turro.erp.task.logic.TaskComposer.afterSave ( )

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

Definition at line 64 of file TaskComposer.java.

64  {
65  if(entity != null) {
66  ErpMenu.showTask(entity);
67  }
68  }
Here is the call graph for this function:

◆ doOnDelete()

void org.turro.erp.task.logic.TaskComposer.doOnDelete ( )
protected

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

Definition at line 71 of file TaskComposer.java.

71  {
72  ZkossUtils.confirmDeletion(null, new Command() {
73  @Override
74  public Object execute(Context context) {
75  TaskComposer.super.doOnDelete();
76  return null;
77  }
78  });
79  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAttributeName()

String org.turro.erp.task.logic.TaskComposer.getAttributeName ( )
protected

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

Definition at line 40 of file TaskComposer.java.

40  {
41  return "task";
42  }

◆ getEntityInstance()

Task org.turro.erp.task.logic.TaskComposer.getEntityInstance ( Long  id)
protected

Definition at line 45 of file TaskComposer.java.

45  {
46  if(id == null) {
47  entity = new Task();
48  entity.setName("");
49  } else {
50  entity = new ErpPU().find(Task.class, id);
51  }
52  return entity;
53  }

◆ getWrapperInstance()

DaoEntity org.turro.erp.task.logic.TaskComposer.getWrapperInstance ( Component  comp)
protected

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

Definition at line 56 of file TaskComposer.java.

56  {
57  TaskWrapper w = new TaskWrapper(entity);
58  Framework.getCurrent().setSelectedLabel(w.getTabLabel());
59  Framework.getCurrent().setSelectedTooltiptext(entity.getFullDescription());
60  return w;
61  }
Here is the call graph for this function:

◆ inDeleteRole()

boolean org.turro.erp.task.logic.TaskComposer.inDeleteRole ( )
protected

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

Definition at line 92 of file TaskComposer.java.

92  {
93  return Application.getApplication().isInRole("erp-task:delete");
94  }
Here is the call graph for this function:

◆ inSaveRole()

boolean org.turro.erp.task.logic.TaskComposer.inSaveRole ( )
protected

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

Definition at line 87 of file TaskComposer.java.

87  {
88  return Application.getApplication().isInRole("erp-task:edit");
89  }
Here is the call graph for this function:

◆ shouldBeSaved()

boolean org.turro.erp.task.logic.TaskComposer.shouldBeSaved ( )
protected

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

Definition at line 82 of file TaskComposer.java.

82  {
83  return !entity.isEmpty() && (entity.getId() == 0) || super.shouldBeSaved();
84  }

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