Class AppSettingsService
- java.lang.Object
-
- de.narimo.georepo.server.appconfig.AppSettingsService
-
public class AppSettingsService extends Object
-
-
Constructor Summary
Constructors Constructor Description AppSettingsService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAppIcons(javax.servlet.ServletContext ctx, InputStream uploadedInputStream, String appkey, String iconName)StringcreateAppKey(de.narimo.commons.dto.User user, AppKey appkey)voidcreateDefaultAppIcons(javax.servlet.ServletContext ctx, String appkey)Create default icons for an app.InvoiceGeneratorcreateInvoiceAndActivateAppkey(javax.servlet.ServletContext ctx, String appkey, de.narimo.commons.dto.User user)CAN WE ACTIVATE AN APP, that has no template key to determine the app provider/ invoice sender??? The invoicing process must be transactional to ensure that no missing id counters persist in the appinvoices table.AppBaseLayersConfigurationgetAppBaseLayersConfiguration(String appkey)AppConfigurationgetAppConfiguration(String appkey)AppDetailsConfigurationgetAppDetailsConfiguration(String appkey)byte[]getAppIcon(javax.servlet.ServletContext ctx, String appkey, String iconName)Returns an icon related to an appkey, if it exists.static AppKeygetAppKeyFromHeader(javax.servlet.http.HttpServletRequest request)List<AppKey>getAppKeysByTemplateKey(String templateKey)AppLayersConfigurationgetAppLayersConfiguration(String appkey)AppManifestConfigurationgetAppManifest(String appkey)List<AppKey>getMyAppKeys(de.narimo.commons.dto.User user)ExtendedAppKeygetPublicAppKeyInformation(String appkey, de.narimo.commons.dto.User user)booleanisAllowedAppIconFileType(String fileType)BooleanisAppOwner(String appkey, de.narimo.commons.dto.User user)static voidmain(String[] args)voidsaveAppBaseLayersConfiguration(AppBaseLayersConfiguration baseLayersConfiguration)voidsaveAppConfiguration(AppConfiguration configuration)voidsaveAppDetailsConfiguration(AppDetailsConfiguration configuration)voidsaveAppLayersConfiguration(AppLayersConfiguration layersConfiguration)voidsaveAppManifest(AppManifestConfiguration appManifestConfiguration)
-
-
-
Method Detail
-
getPublicAppKeyInformation
public ExtendedAppKey getPublicAppKeyInformation(String appkey, de.narimo.commons.dto.User user)
-
getAppConfiguration
public AppConfiguration getAppConfiguration(String appkey) throws SQLException
- Throws:
SQLException
-
getAppDetailsConfiguration
public AppDetailsConfiguration getAppDetailsConfiguration(String appkey) throws javax.ws.rs.NotFoundException, SQLException
- Throws:
javax.ws.rs.NotFoundExceptionSQLException
-
getAppLayersConfiguration
public AppLayersConfiguration getAppLayersConfiguration(String appkey) throws SQLException
- Throws:
SQLException
-
getAppBaseLayersConfiguration
public AppBaseLayersConfiguration getAppBaseLayersConfiguration(String appkey) throws SQLException
- Throws:
SQLException
-
getAppManifest
public AppManifestConfiguration getAppManifest(String appkey) throws SQLException, javax.ws.rs.NotFoundException
- Throws:
SQLExceptionjavax.ws.rs.NotFoundException
-
saveAppConfiguration
public void saveAppConfiguration(AppConfiguration configuration) throws SQLException
- Throws:
SQLException
-
saveAppDetailsConfiguration
public void saveAppDetailsConfiguration(AppDetailsConfiguration configuration) throws SQLException
- Throws:
SQLException
-
saveAppLayersConfiguration
public void saveAppLayersConfiguration(AppLayersConfiguration layersConfiguration) throws SQLException
- Throws:
SQLException
-
saveAppBaseLayersConfiguration
public void saveAppBaseLayersConfiguration(AppBaseLayersConfiguration baseLayersConfiguration) throws SQLException
- Throws:
SQLException
-
saveAppManifest
public void saveAppManifest(AppManifestConfiguration appManifestConfiguration) throws SQLException
- Throws:
SQLException
-
createInvoiceAndActivateAppkey
public InvoiceGenerator createInvoiceAndActivateAppkey(javax.servlet.ServletContext ctx, String appkey, de.narimo.commons.dto.User user) throws javax.ws.rs.ForbiddenException, IllegalStateException
CAN WE ACTIVATE AN APP, that has no template key to determine the app provider/ invoice sender??? The invoicing process must be transactional to ensure that no missing id counters persist in the appinvoices table. Reserved counters must be removed from the appinvoices table if the subsequent invoice generation process fails.- Parameters:
appkey-user-- Throws:
javax.ws.rs.ForbiddenExceptionIllegalStateException
-
getAppKeyFromHeader
public static AppKey getAppKeyFromHeader(javax.servlet.http.HttpServletRequest request)
-
getAppIcon
public byte[] getAppIcon(javax.servlet.ServletContext ctx, String appkey, String iconName) throws IOExceptionReturns an icon related to an appkey, if it exists.- Parameters:
ctx-appkey-iconName-- Returns:
- Throws:
IOException
-
addAppIcons
public void addAppIcons(javax.servlet.ServletContext ctx, InputStream uploadedInputStream, String appkey, String iconName)
-
createDefaultAppIcons
public void createDefaultAppIcons(javax.servlet.ServletContext ctx, String appkey) throws FileNotFoundException, IOExceptionCreate default icons for an app.- Parameters:
ctx-appkey-- Throws:
IOExceptionFileNotFoundException
-
isAllowedAppIconFileType
public boolean isAllowedAppIconFileType(String fileType)
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
-