BrightSide Workbench Full Report + Source Code
org.turro.publication.zul.ctrl.BloggersGrid Class Reference
Inheritance diagram for org.turro.publication.zul.ctrl.BloggersGrid:
Collaboration diagram for org.turro.publication.zul.ctrl.BloggersGrid:

Public Member Functions

void setPublicationCategory (PublicationCategory publicationCategory)
 
void addContact (Contact contact)
 
void pasteContacts ()
 
- Public Member Functions inherited from org.turro.zkoss.grid.PagingGrid
void setColumns (int columns)
 
void setColumns (String hflexs)
 
void refine ()
 
boolean isDefaultBehavior ()
 
void setDefaultBehavior (boolean defaultBehavior)
 
String getRefineValue ()
 
void setRefineValue (String value)
 
int getMaxResults ()
 
void setMaxResults (int maxResults)
 
String getPagingMold ()
 
void setPagingMold (String pagingMold)
 
int getRowCount ()
 
void setRowCount (int rows)
 
void setHeadersVisible (boolean value)
 
boolean isHeadersVisible ()
 
String getVarColumns ()
 
void setVarColumns (String varColumns)
 
Collection< String > getVarColumnsList (String defaultCols)
 
void addDetailColumn ()
 
void addDetailColumn (HtmlBasedComponent caption)
 
void openDetails ()
 
boolean isEmpty ()
 
void clearColumns ()
 
void clearRows ()
 
void clearEmptyGroups ()
 
Columns getColumns (boolean create)
 
Rows getRows (boolean create)
 
Foot getFoot (boolean create)
 
Foot createFoot ()
 
void exportToPdf ()
 

Detailed Description

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

Definition at line 52 of file BloggersGrid.java.

Member Function Documentation

◆ addContact()

void org.turro.publication.zul.ctrl.BloggersGrid.addContact ( Contact  contact)

Definition at line 62 of file BloggersGrid.java.

62  {
63  if(contact == null) {
64  return;
65  }
66  Dao dao = new PublicationPU();
67  if(dao.getSingleResultOrNull(
68  "select ps from PublicationBlogger ps " +
69  "where ps.idContact = ? " +
70  "and ps.publicationCategory = ?",
71  new Object[] { contact.getId(), publicationCategory }
72  ) == null) {
73  PublicationBlogger ps = new PublicationBlogger();
74  ps.setPublicationCategory(publicationCategory);
75  ps.setIdContact(contact.getId());
76  dao.saveObject(ps);
77  SystemLogger.getInstance().doLog(SystemLogType.LOG_INFO, publicationCategory,
78  "blogged", contact.getName());
79  addRows();
80  }
81  }
Here is the call graph for this function:

◆ pasteContacts()

void org.turro.publication.zul.ctrl.BloggersGrid.pasteContacts ( )

Definition at line 83 of file BloggersGrid.java.

83  {
84  List<Contact> contacts = (List<Contact>) Framework.getClipboard().get("bbf_clip_contact");
85  if(contacts != null && publicationCategory != null) {
86  Dao dao = new PublicationPU();
87  for(Contact contact : contacts) {
88  Connector email = contact.getConnectorMap().get(IUser.CONNECTOR_EMAIL);
89  if(email != null && !Strings.isBlank(email.getValue())) {
90  if(dao.getSingleResultOrNull(
91  "select ps from PublicationBlogger ps " +
92  "where ps.idContact = ? " +
93  "and ps.publicationCategory = ?",
94  new Object[] { contact.getId(), publicationCategory }
95  ) == null) {
96  PublicationBlogger ps = new PublicationBlogger();
97  ps.setPublicationCategory(publicationCategory);
98  ps.setIdContact(contact.getId());
99  dao.saveObject(ps);
100  SystemLogger.getInstance().doLog(SystemLogType.LOG_INFO, publicationCategory,
101  "blogged", contact.getName());
102  }
103  }
104  }
105  Framework.getClipboard().remove("bbf_clip_contact");
106  addRows();
107  }
108  }
Here is the call graph for this function:

◆ setPublicationCategory()

void org.turro.publication.zul.ctrl.BloggersGrid.setPublicationCategory ( PublicationCategory  publicationCategory)

Definition at line 56 of file BloggersGrid.java.

56  {
57  this.publicationCategory = publicationCategory;
58  addColumns();
59  addRows();
60  }

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