◆ doFinally()
void org.turro.www.directory.EditDataControl.doFinally |
( |
| ) |
|
|
protected |
◆ getPath()
String org.turro.www.directory.EditDataControl.getPath |
( |
| ) |
|
◆ onBusiness()
void org.turro.www.directory.EditDataControl.onBusiness |
( |
| ) |
|
◆ onDirectory()
void org.turro.www.directory.EditDataControl.onDirectory |
( |
| ) |
throws IOException |
Definition at line 111 of file EditDataControl.java.
112 if(!Authentication.isBehaving()) {
114 Authentication.reauthenticate();
116 Application.getApplication().sendRedirect(path);
◆ onEmail()
void org.turro.www.directory.EditDataControl.onEmail |
( |
| ) |
|
◆ onEvent()
void org.turro.www.directory.EditDataControl.onEvent |
( |
UploadEvent |
t | ) |
throws Exception |
Definition at line 120 of file EditDataControl.java.
121 FileAttach fileAttach =
new FileAttach(ContactsPU.getObjectPath(contact.
getContact()));
122 File newFile =
new File(ElephantContext.getRealPath(fileAttach.getPublishable() +
"/profile/face.png"));
123 if(!newFile.getParentFile().exists()) {
124 newFile.getParentFile().mkdirs();
126 try (FileOutputStream fos =
new FileOutputStream(newFile)) {
127 Media media = t.getMedia();
129 if(media.inMemory()) {
130 fos.write(media.isBinary() ? media.getByteData() : media.getStringData().getBytes());
132 byte[] buffer =
new byte[102400];
133 try (InputStream is = media.isBinary() ? media.getStreamData() :
new ReaderInputStream(media.getReaderData())) {
135 while((r = is.read(buffer)) != -1) {
136 fos.write(buffer, 0, r);
142 String faceFile = fileAttach.getPublicFile(
"/profile/face.png",
false);
143 if(!Strings.isBlank(faceFile)) {
144 face.setContent(
new AImage(ElephantContext.getRealPath(faceFile)));
◆ onNetwork()
void org.turro.www.directory.EditDataControl.onNetwork |
( |
| ) |
|
◆ onPhone()
void org.turro.www.directory.EditDataControl.onPhone |
( |
| ) |
|
◆ onPosition()
void org.turro.www.directory.EditDataControl.onPosition |
( |
| ) |
|
◆ onSave()
void org.turro.www.directory.EditDataControl.onSave |
( |
| ) |
|
Definition at line 151 of file EditDataControl.java.
153 new ContactWrapper((Contact) contact.
getContact()).save();
154 Application.getApplication().sendRedirect(path);
155 sendNotification((Contact) contact.
getContact());
◆ onWeb()
void org.turro.www.directory.EditDataControl.onWeb |
( |
| ) |
|
◆ setPath()
void org.turro.www.directory.EditDataControl.setPath |
( |
String |
path | ) |
|
◆ EMAIL_DIRECTORY
final String org.turro.www.directory.EditDataControl.EMAIL_DIRECTORY = "EmailDirectory" |
|
static |
The documentation for this class was generated from the following file: