◆ afterSave()
void org.turro.contacts.form.ContactComposer.afterSave |
( |
| ) |
|
|
protected |
◆ doFinally()
void org.turro.contacts.form.ContactComposer.doFinally |
( |
| ) |
throws Exception |
Reimplemented from org.turro.jpa.composer.EntityComposer< E, ID >.
Definition at line 213 of file ContactComposer.java.
215 Application app = Application.getApplication();
216 isNew = Strings.isBlank(
entity.getId());
218 fileAttach =
new FileAttach(ContactsPU.getObjectPath(
entity));
219 String faceFile = fileAttach.
getPublicFile(
"/profile/face.png",
false);
220 if(!Strings.isBlank(faceFile)) {
221 face.setSrc(faceFile +
"?" + IdGenerator.generate());
224 IPlugin vcard = Plugins.loadImplementation(IPlugin.class,
"vcard");
226 vcard.setData(
"contact",
entity);
227 qrcode.setContent((RenderedImage) vcard.getData(
"qrcode"));
229 for(String tabKey : getTabKeys()) {
230 Tab tab =
new Tab(I_.get(tabKey));
231 contabs.appendChild(tab);
233 ScrollTabpanel panel =
new ScrollTabpanel();
234 conpanels.appendChild(panel);
236 FieldValueGrid grid =
new FieldValueGrid(tabKey);
237 panel.appendScrollableChild(grid);
String getPublicFile(String file)
◆ doOnDelete()
void org.turro.contacts.form.ContactComposer.doOnDelete |
( |
| ) |
|
|
protected |
Reimplemented from org.turro.jpa.composer.EntityComposer< E, ID >.
Definition at line 190 of file ContactComposer.java.
191 ContactMenu.showEntityModal(
entity.getId(),
"contactId",
"/contact/delContact.zul",
new Command() {
193 public Object execute(Context context) {
194 ModalWindow mw = (ModalWindow) context.get(
"win");
195 if(mw.getResult() == 1) {
196 ContactComposer.super.doOnDelete();
◆ doOnSave()
void org.turro.contacts.form.ContactComposer.doOnSave |
( |
| ) |
|
|
protected |
◆ getAttributeName()
String org.turro.contacts.form.ContactComposer.getAttributeName |
( |
| ) |
|
|
protected |
◆ getEntityInstance()
Contact org.turro.contacts.form.ContactComposer.getEntityInstance |
( |
String |
id | ) |
|
|
protected |
◆ getWrapperInstance()
DaoEntity org.turro.contacts.form.ContactComposer.getWrapperInstance |
( |
Component |
comp | ) |
|
|
protected |
◆ inDeleteRole()
boolean org.turro.contacts.form.ContactComposer.inDeleteRole |
( |
| ) |
|
|
protected |
◆ inSaveRole()
boolean org.turro.contacts.form.ContactComposer.inSaveRole |
( |
| ) |
|
|
protected |
◆ onEvent()
void org.turro.contacts.form.ContactComposer.onEvent |
( |
UploadEvent |
t | ) |
throws Exception |
Definition at line 115 of file ContactComposer.java.
116 File newFile =
new File(ElephantContext.getRealPath(fileAttach.
getPublishable() +
"/profile/face.png"));
117 if(!newFile.getParentFile().exists()) {
118 newFile.getParentFile().mkdirs();
120 Media media = t.getMedia();
122 Medias.toFile(media, newFile, Medias.scaling(600));
124 if(newFile.exists()) {
126 face.setContent(
new AImage(newFile.getAbsolutePath()));
127 }
catch (IOException ex) {
128 Logger.getLogger(EditProfileControl.class.getName()).log(Level.SEVERE,
null, ex);
◆ onLocale()
void org.turro.contacts.form.ContactComposer.onLocale |
( |
| ) |
|
◆ onOrganigram()
void org.turro.contacts.form.ContactComposer.onOrganigram |
( |
| ) |
|
◆ onSocialGroup()
void org.turro.contacts.form.ContactComposer.onSocialGroup |
( |
SelectEvent |
event | ) |
|
Definition at line 104 of file ContactComposer.java.
105 if(event.getReference() instanceof Listitem) {
106 Collection<SocialGroupValue> sgs = socialgroups.
getSelected();
107 SocialGroups.absoluteSyndicate(
109 new HashSet<>(sgs.stream().map(sgv -> sgv.getKey()).collect(Collectors.toList())),
◆ onSubscriptions()
void org.turro.contacts.form.ContactComposer.onSubscriptions |
( |
| ) |
|
◆ onWelcome()
void org.turro.contacts.form.ContactComposer.onWelcome |
( |
| ) |
|
Definition at line 146 of file ContactComposer.java.
147 new MailPool().addContact(Contacts.getContact(
entity))
150 .put(
"link", ElephantContext.getServerUrl(
"http") +
"?" +
151 Actions.createAction(
entity.getConnectorMap().get(IContact.CONNECTOR_EMAIL).getValue(),
"/user/changepass"))
152 .silentSendTemplate(
"welcome", I_.get(
"Welcome") +
" : " + ElephantContext.getSiteName());
153 Clients.showNotification(I_.get(
"Welcome was sent..."));
◆ shouldBeSaved()
boolean org.turro.contacts.form.ContactComposer.shouldBeSaved |
( |
| ) |
|
|
protected |
The documentation for this class was generated from the following file: