◆ createRef() [1/2]
Definition at line 335 of file EditServiceControl.java.
337 Entities.getController(service).getEntityUrl() :
338 Entities.getController(service).getMemberUrl());
◆ createRef() [2/2]
String org.turro.contacts.service.EditServiceControl.createRef |
( |
IConstructor |
constructor, |
|
|
String |
redir |
|
) |
| throws Exception |
◆ doFinally()
void org.turro.contacts.service.EditServiceControl.doFinally |
( |
| ) |
|
|
protected |
Reimplemented from org.turro.elephant.TemplateControl.
Definition at line 321 of file EditServiceControl.java.
323 IAgreements agreements = Plugins.loadImplementation(IAgreements.class,
"agreements");
324 agreements.setContact(Authentication.getIContact());
325 if(!agreements.canAct(
"marketplace-new")) {
326 Application.getApplication().sendRedirect(agreements.getPendingActURL(
"marketplace-new"));
◆ getContextPath()
String org.turro.contacts.service.EditServiceControl.getContextPath |
( |
| ) |
|
◆ getImgUploadMsg()
String org.turro.contacts.service.EditServiceControl.getImgUploadMsg |
( |
| ) |
|
◆ getService()
ContactService org.turro.contacts.service.EditServiceControl.getService |
( |
| ) |
|
◆ onBusiness()
void org.turro.contacts.service.EditServiceControl.onBusiness |
( |
| ) |
|
◆ onCancel()
void org.turro.contacts.service.EditServiceControl.onCancel |
( |
| ) |
|
Definition at line 236 of file EditServiceControl.java.
237 if(!Strings.isBlank(service.
getId())) {
238 Application.getApplication().sendRedirect(contextPath +
"?" +
239 MarkerHelper.setObfuscatedRightNowPars(
"item=" + service.
getId()));
241 Application.getApplication().sendRedirect(contextPath);
◆ onDelete()
void org.turro.contacts.service.EditServiceControl.onDelete |
( |
| ) |
|
Definition at line 275 of file EditServiceControl.java.
276 if(!Strings.isBlank(service.
getId())) {
277 Messages.confirmDeletion().add(service.
getTitle()).show(() -> {
278 ContactServiceWrapper wrapper =
new ContactServiceWrapper(service);
280 Application.getApplication().sendRedirect(contextPath);
◆ onDeleteImage()
void org.turro.contacts.service.EditServiceControl.onDeleteImage |
( |
| ) |
|
Definition at line 286 of file EditServiceControl.java.
287 if(!Strings.isBlank(service.
getId())) {
288 Messages.confirmDeletion().add(I_.get(
"Image")).show(() -> {
289 FileAttach fileAttach =
new FileAttach(ContactsPU.getObjectPath(service));
290 File newFile =
new File(ElephantContext.getRealPath(fileAttach.getPublishable() +
"/profile/face.png"));
291 if(newFile.exists()) {
◆ onEnd()
void org.turro.contacts.service.EditServiceControl.onEnd |
( |
| ) |
|
◆ onPeriodicity()
void org.turro.contacts.service.EditServiceControl.onPeriodicity |
( |
| ) |
|
◆ onPrice()
void org.turro.contacts.service.EditServiceControl.onPrice |
( |
| ) |
|
◆ onPublish()
void org.turro.contacts.service.EditServiceControl.onPublish |
( |
| ) |
|
Definition at line 246 of file EditServiceControl.java.
249 HashMap args =
new HashMap();
250 args.put(
"service", service);
251 args.put(
"wrapper",
new ContactServiceWrapper(service));
252 args.put(
"notifier",
this);
253 if(!Strings.isBlank(service.
getId())) {
254 FileAttach fileAttach =
new FileAttach(ContactsPU.getObjectPath(service));
255 args.put(
"face", fileAttach.getPublicFile(
"/profile/face.png",
false));
256 args.put(
"link", Entities.getController(service).getEntityUrl());
259 MailSenders.getPool()
261 .addByEntity(service,
null)
262 .setRoot(
"/services")
264 .sendTemplate(
"service-marketplace", composeSubject(service));
265 }
catch (EmailException ex) {
266 Logger.getLogger(EditServiceControl.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
268 Application.getApplication().sendRedirect(contextPath +
"?" +
269 MarkerHelper.setObfuscatedRightNowPars(
"item=" + service.
getId()));
270 new PublishServiceNotification(service).sendNotification();
◆ onRelatedUrl()
void org.turro.contacts.service.EditServiceControl.onRelatedUrl |
( |
| ) |
|
Definition at line 125 of file EditServiceControl.java.
126 String relUrl = relatedUrl.getValue();
127 if(!Strings.isBlank(relUrl)) {
128 if(relUrl.contains(
"@")) {
◆ onResponsible()
void org.turro.contacts.service.EditServiceControl.onResponsible |
( |
| ) |
|
◆ onRole()
void org.turro.contacts.service.EditServiceControl.onRole |
( |
| ) |
|
◆ onSave()
void org.turro.contacts.service.EditServiceControl.onSave |
( |
| ) |
|
Definition at line 223 of file EditServiceControl.java.
226 ContactServiceWrapper wrapper =
new ContactServiceWrapper(service);
227 service = wrapper.save();
228 Application.getApplication().sendRedirect(contextPath +
"?" +
229 MarkerHelper.setObfuscatedRightNowPars(
"item=" + service.
getId()));
231 Clients.showNotification(I_.get(
"Fill required fields"));
◆ onSendTest()
void org.turro.contacts.service.EditServiceControl.onSendTest |
( |
| ) |
|
Definition at line 195 of file EditServiceControl.java.
197 HashMap args =
new HashMap();
198 args.put(
"service", service);
199 args.put(
"wrapper",
new ContactServiceWrapper(service));
200 args.put(
"notifier",
this);
201 if(!Strings.isBlank(service.
getId())) {
202 FileAttach fileAttach =
new FileAttach(ContactsPU.getObjectPath(service));
203 args.put(
"face", fileAttach.getPublicFile(
"/profile/face.png",
false));
204 args.put(
"link", Entities.getController(service).getEntityUrl());
207 MailSenders.getPool()
209 .addByEntity(service,
null)
210 .setRoot(
"/services")
212 .sendTemplate(
"service-test", composeSubject(service));
213 Clients.showNotification(I_.get(
"Test sent"));
214 }
catch (EmailException ex) {
215 Logger.getLogger(EditServiceControl.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
218 Clients.showNotification(I_.get(
"Fill required fields"));
◆ onStart()
void org.turro.contacts.service.EditServiceControl.onStart |
( |
| ) |
|
◆ onTax()
void org.turro.contacts.service.EditServiceControl.onTax |
( |
| ) |
|
◆ onText()
void org.turro.contacts.service.EditServiceControl.onText |
( |
| ) |
|
◆ onThematic()
void org.turro.contacts.service.EditServiceControl.onThematic |
( |
| ) |
|
◆ onTitle()
void org.turro.contacts.service.EditServiceControl.onTitle |
( |
| ) |
|
◆ onType()
void org.turro.contacts.service.EditServiceControl.onType |
( |
| ) |
|
◆ onUpload()
void org.turro.contacts.service.EditServiceControl.onUpload |
( |
UploadEvent |
event | ) |
|
Definition at line 167 of file EditServiceControl.java.
168 FileAttach fileAttach =
new FileAttach(ContactsPU.getObjectPath(service));
169 File newFile =
new File(ElephantContext.getRealPath(fileAttach.getPublishable() +
"/profile/face.png"));
170 if(!newFile.getParentFile().exists()) {
171 newFile.getParentFile().mkdirs();
173 Media media =
event.getMedia();
175 Medias.toFile(media, newFile, Medias.smart(900, 450));
177 if(newFile.exists()) {
179 image.setContent(
new AImage(newFile.getAbsolutePath()));
180 }
catch (IOException ex) {
181 Logger.getLogger(EditServiceControl.class.getName()).log(Level.SEVERE,
null, ex);
◆ setContextPath()
void org.turro.contacts.service.EditServiceControl.setContextPath |
( |
String |
contextPath | ) |
|
◆ setResponse()
void org.turro.contacts.service.EditServiceControl.setResponse |
( |
ContactService |
service | ) |
|
The documentation for this class was generated from the following file: