@PermitAll public class ModelManagementServiceBean extends com.whitestein.lsps.common.SecureAndLoggingService implements ModelManagementServiceLocal, ModelManagementServiceRemote
uploadModules(ByteData, StringProperties)
allows uploading of modules to the server. All
modules from the stream are uploaded. For each main module a model element is created and
registered.DELETE_MODEL, MANAGE_MODEL, READ_MODEL
Constructor and Description |
---|
ModelManagementServiceBean()
Creates new instance.
|
ModelManagementServiceBean(ModelManagementDao modelManagementDao,
SettingDao settingDao,
ProcessServiceLocal processService,
ModelProviderService modelProviderService,
BinaryDataServiceLocal binaryDataService,
SharedRecordConfigurationService sharedRecordConfigurationService,
javax.ejb.SessionContext sessionContext,
boolean compileModules)
Constructor
|
Modifier and Type | Method and Description |
---|---|
ByteData |
exportModules(long moduleId)
Create archive(ZIP) file of modules identified by the given module id.
|
ModuleEntryList |
findModuleEntriesByType(long moduleId,
String type)
Returns a list of module entries for the given module and type.
|
ModuleEntry |
findModuleEntryByPath(long moduleId,
String path)
Returns content of the specified process resource for given module.
|
ModuleList |
findModules(ModuleCriteria criteria)
Returns collection of all modules in the repository according to given criteria
|
ModuleDetailsList |
findModulesDetails(ModuleCriteria criteria)
Returns collection of details of all modules in the repository according
to given criteria
|
List<Module> |
getDependentModules(List<Long> moduleIds)
Returns list of modules that imports one of given modules.
|
long |
getExecutableModulesCount() |
Module |
getLatestModule(String name)
Returns the latest module with a given name.
|
Module |
getModule(long moduleId)
Finds module according to module id
|
ModuleEntry |
getModuleEntry(long entryId)
Returns resource data for given id from repository.
|
boolean |
isConfirmModelUpload()
Gets the server hint indicating whether the model upload should be explicitly
confirmed by the user.
|
ModulesProcessingResult |
processArchive(ByteData archive,
Map<String,String> properties)
Process archive represented by byte array.
|
void |
unloadModule(long moduleId)
Removes the module from the system.
|
void |
unloadModules(List<Module> modules)
Unloads modules.
|
void |
unloadModuleWithDependentModules(long moduleId)
Removes the module from the system.
|
ModulesUploadResult |
uploadModules(ByteData archive,
StringProperties uploadProperties)
Process archive represented by byte array.
|
public ModelManagementServiceBean()
public ModelManagementServiceBean(ModelManagementDao modelManagementDao, SettingDao settingDao, ProcessServiceLocal processService, ModelProviderService modelProviderService, BinaryDataServiceLocal binaryDataService, SharedRecordConfigurationService sharedRecordConfigurationService, javax.ejb.SessionContext sessionContext, boolean compileModules)
modelManagementDao
- settingDao
- processService
- modelProviderService
- binaryDataService
- sessionContext
- sharedRecordConfigurationService
- compileModules
- @RightsAllowed(value="Model:Manage") public ModulesUploadResult uploadModules(ByteData archive, StringProperties uploadProperties) throws ModelUploadException
ModelManagementService
uploadModules
in interface ModelManagementService
archive
- byte array representation of archiveuploadProperties
- the upload propertiesModelUploadException
public ModulesProcessingResult processArchive(ByteData archive, Map<String,String> properties) throws ModelUploadException
ModelManagementServiceLocal
processArchive
in interface ModelManagementServiceLocal
archive
- byte array representation of archiveproperties
- the upload propertiesModelUploadException
public void unloadModules(List<Module> modules)
ModelManagementService
unloadModules
in interface ModelManagementService
@RightsAllowed(value="Model:Manage") public ByteData exportModules(long moduleId) throws ModuleNotFoundException
ModelManagementService
exportModules
in interface ModelManagementService
ModuleNotFoundException
@RightsAllowed(value="Model:Read") public ModuleEntryList findModuleEntriesByType(long moduleId, String type) throws ModuleNotFoundException
ModelManagementService
findModuleEntriesByType
in interface ModelManagementService
moduleId
- id of moduletype
- type of the fileModuleNotFoundException
@RightsAllowed(value="Model:Read") public ModuleEntry findModuleEntryByPath(long moduleId, String path) throws ModuleNotFoundException
ModelManagementService
findModuleEntryByPath
in interface ModelManagementService
moduleId
- the module idpath
- path to binary contentModuleNotFoundException
@RightsAllowed(value="Model:Read") public ModuleList findModules(ModuleCriteria criteria)
ModelManagementService
findModules
in interface ModelManagementService
Module
spublic long getExecutableModulesCount()
getExecutableModulesCount
in interface ModelManagementService
@RightsAllowed(value="Model:Read") public ModuleDetailsList findModulesDetails(ModuleCriteria criteria)
ModelManagementService
findModulesDetails
in interface ModelManagementService
ModuleDetails
@RightsAllowed(value="Model:Read") public Module getModule(long moduleId)
ModelManagementService
getModule
in interface ModelManagementService
moduleId
- id of modelModule
or null if not found@RightsAllowed(value="Model:Read") public ModuleEntry getModuleEntry(long entryId)
ModelManagementService
getModuleEntry
in interface ModelManagementService
public Module getLatestModule(String name)
ModelManagementService
getLatestModule
in interface ModelManagementService
null
@RightsAllowed(value="Model:Delete") public void unloadModule(long moduleId) throws ModuleNotFoundException, ModelUnloadException
ModelManagementService
unloadModule
in interface ModelManagementService
ModuleNotFoundException
- if the module does not existModelUnloadException
@RightsAllowed(value="Model:Delete") public void unloadModuleWithDependentModules(long moduleId) throws ModuleNotFoundException, ModelUnloadException
ModelManagementService
unloadModuleWithDependentModules
in interface ModelManagementService
ModuleNotFoundException
- if the module does not existModelUnloadException
public List<Module> getDependentModules(List<Long> moduleIds)
ModelManagementService
getDependentModules
in interface ModelManagementService
moduleIds
- id of modulespublic boolean isConfirmModelUpload()
ModelManagementService
isConfirmModelUpload
in interface ModelManagementService
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.