|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.deepamehta.core.osgi.PluginActivator
de.deepamehta.plugins.images.ImagePlugin
public class ImagePlugin
CKEditor compatible resources for image upload and browse.
Field Summary | |
---|---|
private static String |
FILE_REPOSITORY_PATH
|
private de.deepamehta.plugins.files.service.FilesService |
fileService
|
static String |
IMAGES
|
private static Logger |
log
|
private javax.ws.rs.core.UriInfo |
uriInfo
|
Fields inherited from class de.deepamehta.core.osgi.PluginActivator |
---|
bundle, dms |
Constructor Summary | |
---|---|
ImagePlugin()
|
Method Summary | |
---|---|
de.deepamehta.core.service.ResultList<Image> |
browse()
Returns a set of all image source URLs. |
private String |
getCkEditorCall(Long func,
String uri,
String error)
Returns a in-line JavaScript snippet that calls the parent CKEditor. |
private String |
getRepoUri(String path)
Returns an external accessible file repository URI of path based on actual request URI. |
private void |
postInstallMigration()
|
void |
serviceArrived(de.deepamehta.core.service.PluginService service)
Reference the file service and create the repository path if necessary. |
void |
serviceGone(de.deepamehta.core.service.PluginService service)
Nullify file service reference. |
String |
upload(de.deepamehta.plugins.files.UploadedFile image,
Long func,
de.deepamehta.core.service.ClientState cookie)
CKEditor image upload integration, see CKEDITOR.config.filebrowserImageBrowseUrl |
Methods inherited from class de.deepamehta.core.osgi.PluginActivator |
---|
getBundleContext, getUri, init, postInstall, publishDirectory, setCoreService, shutdown, start, stop, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String IMAGES
private static final String FILE_REPOSITORY_PATH
private static Logger log
private de.deepamehta.plugins.files.service.FilesService fileService
@Context private javax.ws.rs.core.UriInfo uriInfo
Constructor Detail |
---|
public ImagePlugin()
Method Detail |
---|
public String upload(de.deepamehta.plugins.files.UploadedFile image, Long func, @HeaderParam(value="Cookie") de.deepamehta.core.service.ClientState cookie)
image
- Uploaded file resource.func
- CKEDITOR function number to call.cookie
- Actual cookie.
public de.deepamehta.core.service.ResultList<Image> browse()
public void serviceGone(de.deepamehta.core.service.PluginService service)
serviceGone
in interface de.deepamehta.core.osgi.PluginContext
serviceGone
in class de.deepamehta.core.osgi.PluginActivator
public void serviceArrived(de.deepamehta.core.service.PluginService service)
serviceArrived
in interface de.deepamehta.core.osgi.PluginContext
serviceArrived
in class de.deepamehta.core.osgi.PluginActivator
private void postInstallMigration()
private String getCkEditorCall(Long func, String uri, String error)
func
- CKEDITOR function number.uri
- Resource URI.error
- Error message.
private String getRepoUri(String path)
path
- Relative path of a file repository resource.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |