Class AppSettingsRepository


  • public class AppSettingsRepository
    extends Object
    • Constructor Detail

      • AppSettingsRepository

        public AppSettingsRepository()
    • Method Detail

      • getMyAppKeys

        public static List<AppKey> getMyAppKeys​(de.narimo.commons.dto.User user)
      • getAppKey

        public static AppKey getAppKey​(String appkey)
      • getPublicAppKeyInformation

        public static ExtendedAppKey getPublicAppKeyInformation​(String appkey,
                                                                de.narimo.commons.dto.User user)
        Returns information about an appkey that can be publicly handed out.
      • getAppKeysByTemplateKey

        public static List<AppKey> getAppKeysByTemplateKey​(String templateKey)
        Returns all appkeys that have been created from a given template app key or is the template key itself. Only activated appkeys will be returned.
        Parameters:
        templateKey -
        Returns:
      • createAppKey

        public static String createAppKey​(de.narimo.commons.dto.User user,
                                          AppKey appkey)
      • saveAppConfiguration

        public static void saveAppConfiguration​(AppConfiguration appConfiguration)
      • saveAppLayersConfiguration

        public static void saveAppLayersConfiguration​(AppLayersConfiguration appLayersConfiguration)
      • saveAppBaseLayersConfiguration

        public static void saveAppBaseLayersConfiguration​(AppBaseLayersConfiguration appBaseLayersConfiguration)
      • saveAppDetailsConfiguration

        public static void saveAppDetailsConfiguration​(AppDetailsConfiguration appDetailsConfiguration)
      • isAppOwner

        public static boolean isAppOwner​(String appkey,
                                         de.narimo.commons.dto.User user)
      • createAppBaseLayerConfigTable

        public static void createAppBaseLayerConfigTable()
                                                  throws SQLException
        Throws:
        SQLException
      • createAppDetailsConfigTable

        public static void createAppDetailsConfigTable()
                                                throws SQLException
        Throws:
        SQLException
      • isAppkeyActivated

        public static boolean isAppkeyActivated​(String appkey,
                                                de.narimo.commons.dto.User user)
      • getAppkeyInvoiceDetails

        public static Map<String,​AppKey> getAppkeyInvoiceDetails​(String appkey,
                                                                       de.narimo.commons.dto.User user)
      • getAppProvider

        public static int getAppProvider​(String appKey,
                                         de.narimo.commons.dto.User user)
        Returns the userid of the user that is the app provider, i.e. the owner of the templateKey app for a given appKey.
        Parameters:
        appkey -
        user -
        Returns:
      • deactivateAppkey

        public static void deactivateAppkey​(String appkey,
                                            de.narimo.commons.dto.User user)
                                     throws javax.ws.rs.ForbiddenException,
                                            IllegalStateException
        Deactivates an appkey. Internal usage only, do not deactivate an app by user request since this needs handling of invoices, etc.!
        Parameters:
        appkey -
        user -
        Throws:
        javax.ws.rs.ForbiddenException
        IllegalStateException