BrightSide Workbench Full Report + Source Code
org.turro.crm.zul.sale.CampaignWrapper Class Reference
Inheritance diagram for org.turro.crm.zul.sale.CampaignWrapper:
Collaboration diagram for org.turro.crm.zul.sale.CampaignWrapper:

Public Member Functions

 CampaignWrapper (Campaign entity)
 
String getTabLabel ()
 
String getSelfLabel ()
 
boolean canSave ()
 
boolean canDelete ()
 
IDossier getDossier ()
 
- Public Member Functions inherited from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >
 DaoEntity ()
 
 DaoEntity (Class< T > persistentClass)
 
 DaoEntity (T entity)
 
Dao getDao ()
 
getEntity ()
 
IElephantEntity getIee ()
 
find (ID id)
 
save ()
 
boolean delete ()
 
ID getId ()
 
List< String > getMessages ()
 
boolean equals (Object obj)
 
int hashCode ()
 

Protected Member Functions

Dao createDao ()
 
boolean shouldLog ()
 
- Protected Member Functions inherited from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >
void logEntity (SystemLogType logType, Object entity, String action, String data)
 
String dataEntity (Object entity)
 
void initOperation ()
 
void addMessage (String message)
 

Additional Inherited Members

- Static Public Member Functions inherited from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >
static Object getEntityId (Object entity)
 
static boolean isNewId (Object id)
 
- Protected Attributes inherited from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >
entity
 
ID id
 
List< String > messages = new ArrayList<>()
 

Detailed Description

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

Definition at line 36 of file CampaignWrapper.java.

Constructor & Destructor Documentation

◆ CampaignWrapper()

org.turro.crm.zul.sale.CampaignWrapper.CampaignWrapper ( Campaign  entity)

Definition at line 38 of file CampaignWrapper.java.

38  {
39  super(entity);
40  }

Member Function Documentation

◆ canDelete()

boolean org.turro.crm.zul.sale.CampaignWrapper.canDelete ( )

Reimplemented from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >.

Definition at line 62 of file CampaignWrapper.java.

62  {
63  return super.canDelete() &&
64  Application.getApplication().isInRole("campaign:delete") &&
65  entity.getSaleProspects().isEmpty();
66  }
Here is the call graph for this function:

◆ canSave()

boolean org.turro.crm.zul.sale.CampaignWrapper.canSave ( )

Reimplemented from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >.

Definition at line 56 of file CampaignWrapper.java.

56  {
57  return Application.getApplication().isInRole("campaign:edit") &&
58  super.canSave();
59  }
Here is the call graph for this function:

◆ createDao()

Dao org.turro.crm.zul.sale.CampaignWrapper.createDao ( )
protected

Reimplemented from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >.

Definition at line 51 of file CampaignWrapper.java.

51  {
52  return new CrmPU();
53  }

◆ getDossier()

IDossier org.turro.crm.zul.sale.CampaignWrapper.getDossier ( )

Definition at line 68 of file CampaignWrapper.java.

68  {
69  if(entity.getId() > 0) {
70  IDossier dossier = (IDossier) Plugins.loadImplementation(IDossier.class);//PluginChecker.get("dossier");
71  ICategory cat = dossier.addCategory();
72  cat.setDescription("Customer Relationship");
73  cat.setId(8100);
74  cat = dossier.addCategory();
75  cat.setDescription("Campaigns");
76  cat.setId(8102);
77  cat.setParentId(8100);
78  dossier.setDescription(Strings.truncateAndWarn(entity.getDescription(), 50));
79  dossier.setIdCategory(cat.getId());
80  dossier.setPath(CrmPU.getObjectPath(entity));
81  return dossier;
82  }
83  return null;
84  }
Here is the call graph for this function:

◆ getSelfLabel()

String org.turro.crm.zul.sale.CampaignWrapper.getSelfLabel ( )

Definition at line 46 of file CampaignWrapper.java.

46  {
47  return I_.get("Campaign");
48  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTabLabel()

String org.turro.crm.zul.sale.CampaignWrapper.getTabLabel ( )

Definition at line 42 of file CampaignWrapper.java.

42  {
43  return getSelfLabel() + " #" + entity.getId();
44  }
Here is the call graph for this function:

◆ shouldLog()

boolean org.turro.crm.zul.sale.CampaignWrapper.shouldLog ( )
protected

Reimplemented from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >.

Definition at line 87 of file CampaignWrapper.java.

87  {
88  return false;
89  }

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