Package org.molgenis.app.manager.service
Interface AppManagerService
-
- All Known Implementing Classes:
AppManagerServiceImpl
public interface AppManagerService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidactivateApp(App app)Activate an App by App idAppConfigcheckAndObtainConfig(String tempDir, String configContent)Check the app-configuration and obtain theAppConfigif the configuration is validvoidconfigureApp(AppConfig appConfig, String htmlTemplate)Configure app in database.voiddeactivateApp(App app)Deactivate an App by App idvoiddeleteApp(String id)Delete an existing AppStringextractFileContent(String appDir, String fileName)Get the UTF-8 file-content of a file served by an appAppResponsegetAppByName(String appName)Retrieve anAppResponsebased a unique URIList<AppResponse>getApps()Retrieve a list ofAppResponsesStringuploadApp(InputStream zipData, String zipFileName, String formFieldName)Upload an app If zip fails to verify, throw an exception with the missing information
-
-
-
Method Detail
-
getApps
List<AppResponse> getApps()
Retrieve a list ofAppResponses
-
getAppByName
AppResponse getAppByName(String appName)
Retrieve anAppResponsebased a unique URI- Parameters:
appName- The URI of an App- Returns:
- An
AppResponse - Throws:
AppForURIDoesNotExistException- if there is no app with the requested URI
-
activateApp
void activateApp(App app)
Activate an App by App id- Parameters:
app- The App
-
deactivateApp
void deactivateApp(App app)
Deactivate an App by App id- Parameters:
app- The App
-
deleteApp
void deleteApp(String id)
Delete an existing App- Parameters:
id- The id of an App- Throws:
CouldNotDeleteAppException- if deletion fails
-
uploadApp
String uploadApp(InputStream zipData, String zipFileName, String formFieldName) throws IOException
Upload an app If zip fails to verify, throw an exception with the missing information- Parameters:
zipData- steam with app data in zip fromzipFileName- the name of the zip fileformFieldName- the value of the name field in the form- Returns:
- temporary directory for app
- Throws:
IOExceptionInvalidAppArchiveException- if the zipData cannot be unzipped
-
checkAndObtainConfig
AppConfig checkAndObtainConfig(String tempDir, String configContent) throws IOException
Check the app-configuration and obtain theAppConfigif the configuration is valid- Parameters:
tempDir- temporary directory with uploadede app-content- Returns:
- appConfig
- Throws:
IOException
-
configureApp
void configureApp(AppConfig appConfig, String htmlTemplate)
Configure app in database.- Parameters:
appConfig- app configuration objecthtmlTemplate- HTML template based on the packaged index.html
-
-