|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.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 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 | |
---|---|
ResultSet<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(PluginService service)
Reference the file service and create the repository path if necessary. |
void |
serviceGone(PluginService service)
Nullify file service reference. |
String |
upload(UploadedFile image,
Long func,
ClientState cookie)
CKEditor image upload integration, see CKEDITOR.config.filebrowserImageBrowseUrl |
Methods inherited from class de.deepamehta.core.osgi.PluginActivator |
---|
getBundleContext, init, postInstall, publishDirectory, setCoreService, 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 FilesService fileService
@Context private javax.ws.rs.core.UriInfo uriInfo
Constructor Detail |
---|
public ImagePlugin()
Method Detail |
---|
public String upload(UploadedFile image, Long func, @HeaderParam(value="Cookie") ClientState cookie)
image
- Uploaded file resource.func
- CKEDITOR function number to call.cookie
- Actual cookie.
public ResultSet<Image> browse()
public void serviceGone(PluginService service)
serviceGone
in interface PluginContext
serviceGone
in class PluginActivator
public void serviceArrived(PluginService service)
serviceArrived
in interface PluginContext
serviceArrived
in class 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 |