Package org.uberfire.ext.plugin.backend
Class PluginServicesImpl
- java.lang.Object
-
- org.uberfire.ext.plugin.backend.PluginServicesImpl
-
- All Implemented Interfaces:
org.uberfire.ext.editor.commons.service.support.SupportsCopy,org.uberfire.ext.editor.commons.service.support.SupportsDelete,org.uberfire.ext.editor.commons.service.support.SupportsRename,org.uberfire.ext.editor.commons.service.support.SupportsSaveAndRename<org.uberfire.ext.plugin.model.Plugin,org.uberfire.ext.editor.commons.file.DefaultMetadata>,org.uberfire.ext.editor.commons.service.support.SupportsUpdate<org.uberfire.ext.plugin.model.Plugin,org.uberfire.ext.editor.commons.file.DefaultMetadata>,org.uberfire.ext.plugin.service.PluginServices
@ApplicationScoped public class PluginServicesImpl extends Object implements org.uberfire.ext.plugin.service.PluginServices
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.gson.Gsongson
-
Constructor Summary
Constructors Constructor Description PluginServicesImpl()PluginServicesImpl(org.uberfire.io.IOService ioService, javax.enterprise.inject.Instance<MediaServletURI> mediaServletURI, org.uberfire.rpc.SessionInfo sessionInfo, javax.enterprise.event.Event<org.uberfire.ext.plugin.event.PluginAdded> pluginAddedEvent, javax.enterprise.event.Event<org.uberfire.ext.plugin.event.PluginDeleted> pluginDeletedEvent, javax.enterprise.event.Event<org.uberfire.ext.plugin.event.PluginSaved> pluginSavedEvent, javax.enterprise.event.Event<org.uberfire.ext.plugin.event.PluginRenamed> pluginRenamedEvent, javax.enterprise.event.Event<org.uberfire.ext.plugin.event.MediaDeleted> mediaDeletedEvent, org.uberfire.ext.editor.commons.backend.validation.DefaultFileNameValidator defaultFileNameValidator, org.jboss.errai.security.shared.api.identity.User identity, org.uberfire.java.nio.file.FileSystem pluginsFileSystem, org.uberfire.java.nio.file.FileSystem perspectivesFileSystem, org.uberfire.ext.editor.commons.backend.service.SaveAndRenameServiceImpl<org.uberfire.ext.plugin.model.Plugin,org.uberfire.ext.editor.commons.file.DefaultMetadata> saveAndRenameService, org.uberfire.spaces.SpacesAPI spacesAPI)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.uberfire.backend.vfs.Pathcopy(org.uberfire.backend.vfs.Path path, String newName, String comment)org.uberfire.backend.vfs.Pathcopy(org.uberfire.backend.vfs.Path path, String newName, org.uberfire.backend.vfs.Path targetDirectory, String comment)org.uberfire.ext.plugin.model.PlugincreateNewPlugin(String pluginName, org.uberfire.ext.plugin.model.PluginType type)voiddelete(org.uberfire.backend.vfs.Path path, String comment)voiddeleteMedia(org.uberfire.ext.plugin.model.Media media)org.uberfire.ext.plugin.model.DynamicMenugetDynamicMenuContent(org.uberfire.backend.vfs.Path path)org.uberfire.ext.plugin.model.LayoutEditorModelgetLayoutEditor(org.uberfire.backend.vfs.Path path, org.uberfire.ext.plugin.model.PluginType pluginType)StringgetMediaServletURI()org.uberfire.ext.plugin.model.PluginContentgetPluginContent(org.uberfire.backend.vfs.Path path)voidinit()Collection<org.uberfire.ext.plugin.model.DynamicMenu>listDynamicMenus()Collection<org.uberfire.ext.plugin.model.LayoutEditorModel>listLayoutEditor(org.uberfire.ext.plugin.model.PluginType pluginType)Collection<org.uberfire.ext.plugin.model.RuntimePlugin>listPluginRuntimePlugins(org.uberfire.backend.vfs.Path pluginPath)Collection<org.uberfire.ext.plugin.model.Plugin>listPlugins()Collection<org.uberfire.ext.plugin.model.Plugin>listPlugins(org.uberfire.ext.plugin.model.PluginType type)Collection<org.uberfire.ext.plugin.model.RuntimePlugin>listRuntimePlugins()org.uberfire.backend.vfs.Pathrename(org.uberfire.backend.vfs.Path path, String newName, String comment)org.uberfire.backend.vfs.Pathsave(org.uberfire.backend.vfs.Path _path, org.uberfire.ext.plugin.model.Plugin content, org.uberfire.ext.editor.commons.file.DefaultMetadata _metadata, String comment)org.uberfire.backend.vfs.Pathsave(org.uberfire.ext.plugin.model.Plugin plugin, String commitMessage)org.uberfire.backend.vfs.Pathsave(org.uberfire.ext.plugin.model.PluginSimpleContent plugin, String commitMessage)org.uberfire.backend.vfs.PathsaveAndRename(org.uberfire.backend.vfs.Path path, String newFileName, org.uberfire.ext.editor.commons.file.DefaultMetadata metadata, org.uberfire.ext.plugin.model.Plugin content, String comment)org.uberfire.backend.vfs.PathsaveLayout(org.uberfire.ext.plugin.model.LayoutEditorModel plugin, String commitMessage)org.uberfire.backend.vfs.PathsaveMenu(org.uberfire.ext.plugin.model.DynamicMenu plugin, String commitMessage)
-
-
-
Constructor Detail
-
PluginServicesImpl
public PluginServicesImpl()
-
PluginServicesImpl
@Inject public PluginServicesImpl(@Named("ioStrategy") org.uberfire.io.IOService ioService, @Named("MediaServletURI") javax.enterprise.inject.Instance<MediaServletURI> mediaServletURI, org.uberfire.rpc.SessionInfo sessionInfo, javax.enterprise.event.Event<org.uberfire.ext.plugin.event.PluginAdded> pluginAddedEvent, javax.enterprise.event.Event<org.uberfire.ext.plugin.event.PluginDeleted> pluginDeletedEvent, javax.enterprise.event.Event<org.uberfire.ext.plugin.event.PluginSaved> pluginSavedEvent, javax.enterprise.event.Event<org.uberfire.ext.plugin.event.PluginRenamed> pluginRenamedEvent, javax.enterprise.event.Event<org.uberfire.ext.plugin.event.MediaDeleted> mediaDeletedEvent, org.uberfire.ext.editor.commons.backend.validation.DefaultFileNameValidator defaultFileNameValidator, org.jboss.errai.security.shared.api.identity.User identity, @Named("pluginsFS") org.uberfire.java.nio.file.FileSystem pluginsFileSystem, @Named("perspectivesFS") org.uberfire.java.nio.file.FileSystem perspectivesFileSystem, org.uberfire.ext.editor.commons.backend.service.SaveAndRenameServiceImpl<org.uberfire.ext.plugin.model.Plugin,org.uberfire.ext.editor.commons.file.DefaultMetadata> saveAndRenameService, org.uberfire.spaces.SpacesAPI spacesAPI)
-
-
Method Detail
-
init
@PostConstruct public void init()
-
getMediaServletURI
public String getMediaServletURI()
- Specified by:
getMediaServletURIin interfaceorg.uberfire.ext.plugin.service.PluginServices
-
listRuntimePlugins
public Collection<org.uberfire.ext.plugin.model.RuntimePlugin> listRuntimePlugins()
- Specified by:
listRuntimePluginsin interfaceorg.uberfire.ext.plugin.service.PluginServices
-
listPluginRuntimePlugins
public Collection<org.uberfire.ext.plugin.model.RuntimePlugin> listPluginRuntimePlugins(org.uberfire.backend.vfs.Path pluginPath)
- Specified by:
listPluginRuntimePluginsin interfaceorg.uberfire.ext.plugin.service.PluginServices
-
listPlugins
public Collection<org.uberfire.ext.plugin.model.Plugin> listPlugins()
- Specified by:
listPluginsin interfaceorg.uberfire.ext.plugin.service.PluginServices
-
listPlugins
public Collection<org.uberfire.ext.plugin.model.Plugin> listPlugins(org.uberfire.ext.plugin.model.PluginType type)
- Specified by:
listPluginsin interfaceorg.uberfire.ext.plugin.service.PluginServices
-
createNewPlugin
public org.uberfire.ext.plugin.model.Plugin createNewPlugin(String pluginName, org.uberfire.ext.plugin.model.PluginType type)
- Specified by:
createNewPluginin interfaceorg.uberfire.ext.plugin.service.PluginServices
-
getPluginContent
public org.uberfire.ext.plugin.model.PluginContent getPluginContent(org.uberfire.backend.vfs.Path path)
- Specified by:
getPluginContentin interfaceorg.uberfire.ext.plugin.service.PluginServices
-
save
public org.uberfire.backend.vfs.Path save(org.uberfire.ext.plugin.model.Plugin plugin, String commitMessage)- Specified by:
savein interfaceorg.uberfire.ext.plugin.service.PluginServices
-
save
public org.uberfire.backend.vfs.Path save(org.uberfire.ext.plugin.model.PluginSimpleContent plugin, String commitMessage)
-
delete
public void delete(org.uberfire.backend.vfs.Path path, String comment)- Specified by:
deletein interfaceorg.uberfire.ext.editor.commons.service.support.SupportsDelete
-
copy
public org.uberfire.backend.vfs.Path copy(org.uberfire.backend.vfs.Path path, String newName, String comment)- Specified by:
copyin interfaceorg.uberfire.ext.editor.commons.service.support.SupportsCopy
-
copy
public org.uberfire.backend.vfs.Path copy(org.uberfire.backend.vfs.Path path, String newName, org.uberfire.backend.vfs.Path targetDirectory, String comment)- Specified by:
copyin interfaceorg.uberfire.ext.editor.commons.service.support.SupportsCopy
-
rename
public org.uberfire.backend.vfs.Path rename(org.uberfire.backend.vfs.Path path, String newName, String comment)- Specified by:
renamein interfaceorg.uberfire.ext.editor.commons.service.support.SupportsRename
-
deleteMedia
public void deleteMedia(org.uberfire.ext.plugin.model.Media media)
- Specified by:
deleteMediain interfaceorg.uberfire.ext.plugin.service.PluginServices
-
getDynamicMenuContent
public org.uberfire.ext.plugin.model.DynamicMenu getDynamicMenuContent(org.uberfire.backend.vfs.Path path)
- Specified by:
getDynamicMenuContentin interfaceorg.uberfire.ext.plugin.service.PluginServices
-
getLayoutEditor
public org.uberfire.ext.plugin.model.LayoutEditorModel getLayoutEditor(org.uberfire.backend.vfs.Path path, org.uberfire.ext.plugin.model.PluginType pluginType)- Specified by:
getLayoutEditorin interfaceorg.uberfire.ext.plugin.service.PluginServices
-
saveMenu
public org.uberfire.backend.vfs.Path saveMenu(org.uberfire.ext.plugin.model.DynamicMenu plugin, String commitMessage)- Specified by:
saveMenuin interfaceorg.uberfire.ext.plugin.service.PluginServices
-
saveLayout
public org.uberfire.backend.vfs.Path saveLayout(org.uberfire.ext.plugin.model.LayoutEditorModel plugin, String commitMessage)- Specified by:
saveLayoutin interfaceorg.uberfire.ext.plugin.service.PluginServices
-
listDynamicMenus
public Collection<org.uberfire.ext.plugin.model.DynamicMenu> listDynamicMenus()
- Specified by:
listDynamicMenusin interfaceorg.uberfire.ext.plugin.service.PluginServices
-
listLayoutEditor
public Collection<org.uberfire.ext.plugin.model.LayoutEditorModel> listLayoutEditor(org.uberfire.ext.plugin.model.PluginType pluginType)
- Specified by:
listLayoutEditorin interfaceorg.uberfire.ext.plugin.service.PluginServices
-
save
public org.uberfire.backend.vfs.Path save(org.uberfire.backend.vfs.Path _path, org.uberfire.ext.plugin.model.Plugin content, org.uberfire.ext.editor.commons.file.DefaultMetadata _metadata, String comment)- Specified by:
savein interfaceorg.uberfire.ext.editor.commons.service.support.SupportsUpdate<org.uberfire.ext.plugin.model.Plugin,org.uberfire.ext.editor.commons.file.DefaultMetadata>
-
saveAndRename
public org.uberfire.backend.vfs.Path saveAndRename(org.uberfire.backend.vfs.Path path, String newFileName, org.uberfire.ext.editor.commons.file.DefaultMetadata metadata, org.uberfire.ext.plugin.model.Plugin content, String comment)- Specified by:
saveAndRenamein interfaceorg.uberfire.ext.editor.commons.service.support.SupportsSaveAndRename<org.uberfire.ext.plugin.model.Plugin,org.uberfire.ext.editor.commons.file.DefaultMetadata>
-
-