BrightSide Workbench Full Report + Source Code
org.turro.queue.zul.CategorySubscribersGrid Class Reference
Inheritance diagram for org.turro.queue.zul.CategorySubscribersGrid:
Collaboration diagram for org.turro.queue.zul.CategorySubscribersGrid:

Public Member Functions

void setNotificationCategory (NotificationCategory notificationCategory)
 
void addContact (IContact contact)
 
void pasteContacts ()
 
void addAttendeesByEntity (String entityPath, boolean deep)
 
void addAssistantsByEntity ()
 
void checkConstraints ()
 
void removeAll ()
 
void periodToAll (final QueuePeriod period)
 
void onEvent (Event event) throws Exception
 
- 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 57 of file CategorySubscribersGrid.java.

Member Function Documentation

◆ addAssistantsByEntity()

void org.turro.queue.zul.CategorySubscribersGrid.addAssistantsByEntity ( )

Definition at line 104 of file CategorySubscribersGrid.java.

104  {
105  AssistantDialog.load((as) -> {
106  for(Assistant a : as) {
107  IContact contact = a.contact;
108  if(notificationCategory != null && notificationCategory.isValid(contact) && notificationCategory.strongBond(ConstraintKeys.from(contact))) {
109  notificationCategory.getNotification().subscribe(
110  notificationCategory.getIdCategory(), contact, notificationCategory.getDefaultPeriod());
111  }
112  }
113  addRows();
114  });
115  }
Here is the call graph for this function:

◆ addAttendeesByEntity()

void org.turro.queue.zul.CategorySubscribersGrid.addAttendeesByEntity ( String  entityPath,
boolean  deep 
)

Definition at line 90 of file CategorySubscribersGrid.java.

90  {
91  if(Strings.isBlank(entityPath)) return;
92  AssistantSet as = new AssistantSet();
93  Assistants.addAssistants(entityPath, deep, as, deep ? AssistantConstants.all() : null);
94  for(Assistant a : as) {
95  IContact contact = a.contact;
96  if(notificationCategory != null && notificationCategory.isValid(contact) && notificationCategory.strongBond(ConstraintKeys.from(contact))) {
97  notificationCategory.getNotification().subscribe(
98  notificationCategory.getIdCategory(), contact, notificationCategory.getDefaultPeriod());
99  }
100  }
101  addRows();
102  }
void subscribe(String idCategory, IContact contact, QueuePeriod period)
Here is the call graph for this function:

◆ addContact()

void org.turro.queue.zul.CategorySubscribersGrid.addContact ( IContact  contact)

Definition at line 67 of file CategorySubscribersGrid.java.

67  {
68  if(notificationCategory != null && notificationCategory.isValid(contact) && notificationCategory.strongBond(ConstraintKeys.from(contact))) {
69  notificationCategory.getNotification().subscribeIfNot(
70  notificationCategory.getIdCategory(), contact, notificationCategory.getDefaultPeriod());
71  addRows();
72  }
73  }
void subscribeIfNot(String idCategory, IContact contact, QueuePeriod period)
Here is the call graph for this function:

◆ checkConstraints()

void org.turro.queue.zul.CategorySubscribersGrid.checkConstraints ( )

Definition at line 117 of file CategorySubscribersGrid.java.

117  {
118  if(notificationCategory != null) {
119  Messages.confirmProcess().add(I_.get("This process will check all subscribers...")).show(() -> {
120  notificationCategory.getNotification().checkConstraints(notificationCategory.getIdCategory());
121  addRows();
122  });
123  }
124  }
Here is the call graph for this function:

◆ onEvent()

void org.turro.queue.zul.CategorySubscribersGrid.onEvent ( Event  event) throws Exception

Definition at line 187 of file CategorySubscribersGrid.java.

187  {
188  if(event.getTarget() instanceof QueuePeriodListbox) {
189  QueuePeriodListbox qpl = (QueuePeriodListbox) event.getTarget();
190  QueueOptions qo = (QueueOptions) qpl.getAttribute("options");
191  qo.setPeriod(qpl.getObjectValue());
192  new QueueManager().configQueue(qo);
193  } else if(event.getTarget() instanceof Toolbarbutton) {
194  Toolbarbutton del = (Toolbarbutton) event.getTarget();
195  QueueOptions qo = (QueueOptions) del.getAttribute("options");
196  new QueueManager().removeOptions(qo);
197  addRows();
198  }
199  }
Here is the call graph for this function:

◆ pasteContacts()

void org.turro.queue.zul.CategorySubscribersGrid.pasteContacts ( )

Definition at line 75 of file CategorySubscribersGrid.java.

75  {
76  List<Object> contacts = (List<Object>) Framework.getClipboard().get("bbf_clip_contact");
77  if(contacts != null && notificationCategory != null) {
78  for(Object c : contacts) {
79  IContact contact = Contacts.getContact(c);
80  if(notificationCategory != null && notificationCategory.isValid(contact) && notificationCategory.strongBond(ConstraintKeys.from(contact))) {
81  notificationCategory.getNotification().subscribeIfNot(
82  notificationCategory.getIdCategory(), contact, notificationCategory.getDefaultPeriod());
83  }
84  }
85  Framework.getClipboard().remove("bbf_clip_contact");
86  addRows();
87  }
88  }
Here is the call graph for this function:

◆ periodToAll()

void org.turro.queue.zul.CategorySubscribersGrid.periodToAll ( final QueuePeriod  period)

Definition at line 135 of file CategorySubscribersGrid.java.

135  {
136  if(notificationCategory != null) {
137  if(notificationCategory.getAllowedPeriods().contains(period)) {
138  Messages.confirmProcess().show(() -> {
139  notificationCategory.getNotification().periodToAll(notificationCategory.getIdCategory(), period);
140  addRows();
141  });
142  }
143  }
144  }
Here is the call graph for this function:

◆ removeAll()

void org.turro.queue.zul.CategorySubscribersGrid.removeAll ( )

Definition at line 126 of file CategorySubscribersGrid.java.

126  {
127  if(notificationCategory != null) {
128  Messages.confirmDeletion().show(() -> {
129  notificationCategory.getNotification().removeAll(notificationCategory.getIdCategory());
130  addRows();
131  });
132  }
133  }
Here is the call graph for this function:

◆ setNotificationCategory()

void org.turro.queue.zul.CategorySubscribersGrid.setNotificationCategory ( NotificationCategory  notificationCategory)

Definition at line 61 of file CategorySubscribersGrid.java.

61  {
62  this.notificationCategory = notificationCategory;
63  addColumns();
64  addRows();
65  }

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