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.Gson
gson
-
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.Path
copy(org.uberfire.backend.vfs.Path path, String newName, String comment)
org.uberfire.backend.vfs.Path
copy(org.uberfire.backend.vfs.Path path, String newName, org.uberfire.backend.vfs.Path targetDirectory, String comment)
org.uberfire.ext.plugin.model.Plugin
createNewPlugin(String pluginName, org.uberfire.ext.plugin.model.PluginType type)
void
delete(org.uberfire.backend.vfs.Path path, String comment)
void
deleteMedia(org.uberfire.ext.plugin.model.Media media)
org.uberfire.ext.plugin.model.DynamicMenu
getDynamicMenuContent(org.uberfire.backend.vfs.Path path)
org.uberfire.ext.plugin.model.LayoutEditorModel
getLayoutEditor(org.uberfire.backend.vfs.Path path, org.uberfire.ext.plugin.model.PluginType pluginType)
String
getMediaServletURI()
org.uberfire.ext.plugin.model.PluginContent
getPluginContent(org.uberfire.backend.vfs.Path path)
void
init()
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.Path
rename(org.uberfire.backend.vfs.Path path, String newName, String comment)
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)
org.uberfire.backend.vfs.Path
save(org.uberfire.ext.plugin.model.Plugin plugin, String commitMessage)
org.uberfire.backend.vfs.Path
save(org.uberfire.ext.plugin.model.PluginSimpleContent plugin, String commitMessage)
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)
org.uberfire.backend.vfs.Path
saveLayout(org.uberfire.ext.plugin.model.LayoutEditorModel plugin, String commitMessage)
org.uberfire.backend.vfs.Path
saveMenu(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:
getMediaServletURI
in interfaceorg.uberfire.ext.plugin.service.PluginServices
-
listRuntimePlugins
public Collection<org.uberfire.ext.plugin.model.RuntimePlugin> listRuntimePlugins()
- Specified by:
listRuntimePlugins
in interfaceorg.uberfire.ext.plugin.service.PluginServices
-
listPluginRuntimePlugins
public Collection<org.uberfire.ext.plugin.model.RuntimePlugin> listPluginRuntimePlugins(org.uberfire.backend.vfs.Path pluginPath)
- Specified by:
listPluginRuntimePlugins
in interfaceorg.uberfire.ext.plugin.service.PluginServices
-
listPlugins
public Collection<org.uberfire.ext.plugin.model.Plugin> listPlugins()
- Specified by:
listPlugins
in 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:
listPlugins
in 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:
createNewPlugin
in interfaceorg.uberfire.ext.plugin.service.PluginServices
-
getPluginContent
public org.uberfire.ext.plugin.model.PluginContent getPluginContent(org.uberfire.backend.vfs.Path path)
- Specified by:
getPluginContent
in 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:
save
in 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:
delete
in 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:
copy
in 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:
copy
in 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:
rename
in interfaceorg.uberfire.ext.editor.commons.service.support.SupportsRename
-
deleteMedia
public void deleteMedia(org.uberfire.ext.plugin.model.Media media)
- Specified by:
deleteMedia
in interfaceorg.uberfire.ext.plugin.service.PluginServices
-
getDynamicMenuContent
public org.uberfire.ext.plugin.model.DynamicMenu getDynamicMenuContent(org.uberfire.backend.vfs.Path path)
- Specified by:
getDynamicMenuContent
in 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:
getLayoutEditor
in 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:
saveMenu
in 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:
saveLayout
in interfaceorg.uberfire.ext.plugin.service.PluginServices
-
listDynamicMenus
public Collection<org.uberfire.ext.plugin.model.DynamicMenu> listDynamicMenus()
- Specified by:
listDynamicMenus
in 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:
listLayoutEditor
in 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:
save
in 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:
saveAndRename
in interfaceorg.uberfire.ext.editor.commons.service.support.SupportsSaveAndRename<org.uberfire.ext.plugin.model.Plugin,org.uberfire.ext.editor.commons.file.DefaultMetadata>
-
-