Package org.hoteia.qalingo.core.domain

Examples of org.hoteia.qalingo.core.domain.EngineSettingValue


    engineSettingValue.setDateUpdate(new Date());
        if (engineSettingValue.getId() != null) {
            if(em.contains(engineSettingValue)){
                em.refresh(engineSettingValue);
            }
            EngineSettingValue mergedEngineSettingValue = em.merge(engineSettingValue);
            em.flush();
            return mergedEngineSettingValue;
        } else {
            em.persist(engineSettingValue);
            return engineSettingValue;
View Full Code Here


  protected TrackingViewBean initTracking(final HttpServletRequest request, final Model model) throws Exception {
    TrackingViewBean trackingViewBean = null;
      final String contextValue = requestUtil.getCurrentContextNameValue(request);

      EngineSetting webTrackingNumberEngineSetting = engineSettingService.getSettingWebTrackingNumber();
      EngineSettingValue webTrackingNumberEngineSettingValue = webTrackingNumberEngineSetting.getEngineSettingValue(contextValue);
      if(webTrackingNumberEngineSettingValue != null
          && StringUtils.isNotEmpty(webTrackingNumberEngineSettingValue.getValue())){
        trackingViewBean = new TrackingViewBean();
        trackingViewBean.setTrackingNumber(webTrackingNumberEngineSettingValue.getValue());
       
        EngineSetting webTrackingNameEngineSetting = engineSettingService.getSettingWebTrackingName();
        EngineSettingValue webTrackingNameEngineSettingValue = webTrackingNameEngineSetting.getEngineSettingValue(contextValue);
        if(webTrackingNameEngineSettingValue != null){
          trackingViewBean.setTrackingName(webTrackingNameEngineSettingValue.getValue());
        }

      }
    return trackingViewBean;
  }
View Full Code Here

  protected MonitoringViewBean initMonitoring(final HttpServletRequest request, final Model model) throws Exception {
    MonitoringViewBean monitoringViewBean = new MonitoringViewBean();
      final String contextValue = requestUtil.getCurrentContextNameValue(request);
      EngineSetting webMonitoringNumberEngineSetting = engineSettingService.getSettingWebMonitoringNumber();
      if(webMonitoringNumberEngineSetting != null){
          EngineSettingValue webMonitoringNumberEngineSettingValue = webMonitoringNumberEngineSetting.getEngineSettingValue(contextValue);
          if(webMonitoringNumberEngineSettingValue != null
                  && StringUtils.isNotEmpty(webMonitoringNumberEngineSettingValue.getValue())){
              monitoringViewBean = new MonitoringViewBean();
              monitoringViewBean.setMonitoringNumber(webMonitoringNumberEngineSettingValue.getValue());
             
              EngineSetting webMonitoringNameEngineSetting = engineSettingService.getSettingWebMonitoringName();
              EngineSettingValue webMonitoringNameEngineSettingValue = webMonitoringNameEngineSetting.getEngineSettingValue(contextValue);
              if(webMonitoringNameEngineSettingValue != null){
                  monitoringViewBean.setMonitoringName(webMonitoringNameEngineSettingValue.getValue());
              }
          }
      }
    return monitoringViewBean;
  }
View Full Code Here

        final String engineSettingValueContext = request.getParameter(RequestConstants.REQUEST_PARAMETER_ENGINE_SETTING_VALUE_CONTEXT);
        if(StringUtils.isNotEmpty(engineSettingCode)
                && StringUtils.isNotEmpty(engineSettingValueContext)){
            final EngineSetting engineSetting = engineSettingService.getEngineSettingByCode(engineSettingCode);
            if(engineSetting != null){
                EngineSettingValue engineSettingValue = engineSetting.getEngineSettingValue(engineSettingValueContext);
                if(engineSettingValue != null){
                    modelAndView.addObject("engineSetting", backofficeViewBeanFactory.buildViewBeanEngineSetting(requestData, engineSetting));
                    modelAndView.addObject("engineSettingValue", backofficeViewBeanFactory.buildViewBeanEngineSettingValue(requestData, engineSettingValue));
                    modelAndView.addObject("engineSettingValueForm", backofficeFormFactory.buildEngineSettingValueForm(requestData, engineSettingValue));
View Full Code Here

            return engineSettingValueEdit(request, model, engineSettingValueForm);
        }

        final String engineSettingValueId = engineSettingValueForm.getId();
        EngineSettingValue engineSettingValue = new EngineSettingValue();
        if(null == engineSettingValueId){
           
            webBackofficeService.updateEngineSettingValue(engineSettingValue, engineSettingValueForm);
           
        }else{
View Full Code Here

    public String getCurrentThemeResourcePrefixPath(final RequestData requestData) throws Exception {
        final HttpServletRequest request = requestData.getRequest();
        EngineSetting engineSetting = engineSettingService.getSettingThemeResourcePrefixPath();
        try {
            String contextValue = getCurrentContextNameValue(request);
            EngineSettingValue engineSettingValue = engineSetting.getEngineSettingValue(contextValue);
            String prefixPath = engineSetting.getDefaultValue();
            if (engineSettingValue != null) {
                prefixPath = engineSettingValue.getValue();
            } else {
                logger.warn("This engine setting is request, but doesn't exist: " + engineSetting.getCode() + "/" + contextValue);
            }
            String currentThemeResourcePrefixPath = prefixPath + getCurrentTheme(requestData);
            if (currentThemeResourcePrefixPath.endsWith("/")) {
View Full Code Here

    // SANITY CHECK
    if(!requestUtil.hasKnownCustomerLogged(request)){
      try {
          // CLIENT ID
          EngineSetting clientIdEngineSetting = engineSettingService.getSettingOAuthAppKeyOrId();
          EngineSettingValue clientIdEngineSettingValue = clientIdEngineSetting.getEngineSettingValue(OAuthType.FACEBOOK.name());
         
          // CLIENT SECRET
          EngineSetting clientSecretEngineSetting = engineSettingService.getSettingOAuthAppSecret();
          EngineSettingValue clientSecretEngineSettingValue = clientSecretEngineSetting.getEngineSettingValue(OAuthType.FACEBOOK.name());
         
          // CLIENT PERMISSIONS
          EngineSetting permissionsEngineSetting = engineSettingService.getSettingOAuthAppPermissions();
          EngineSettingValue permissionsEngineSettingValue = permissionsEngineSetting.getEngineSettingValue(OAuthType.FACEBOOK.name());
         
          if(clientIdEngineSettingValue != null
              && clientSecretEngineSetting != null
              && permissionsEngineSettingValue != null){
          final String clientId = clientIdEngineSettingValue.getValue();
          final String clientSecret = clientSecretEngineSettingValue.getValue();
          final String permissions = permissionsEngineSettingValue.getValue();
         
          final String facebookCallBackURL = urlService.buildAbsoluteUrl(requestData, urlService.buildOAuthCallBackUrl(requestData, OAuthType.FACEBOOK.getPropertyKey().toLowerCase()));

            OAuthService service = new ServiceBuilder()
                    .provider(FacebookApi.class)
View Full Code Here

    // SANITY CHECK
    if(!requestUtil.hasKnownCustomerLogged(request)){
      try {
          // CLIENT ID
          EngineSetting clientIdEngineSetting = engineSettingService.getSettingOAuthAppKeyOrId();
          EngineSettingValue clientIdEngineSettingValue = clientIdEngineSetting.getEngineSettingValue(OAuthType.TWITTER.name());
         
          // CLIENT SECRET
          EngineSetting clientSecretEngineSetting = engineSettingService.getSettingOAuthAppSecret();
          EngineSettingValue clientSecretEngineSettingValue = clientSecretEngineSetting.getEngineSettingValue(OAuthType.TWITTER.name());
         
          // CLIENT PERMISSIONS
          EngineSetting permissionsEngineSetting = engineSettingService.getSettingOAuthAppPermissions();
          EngineSettingValue permissionsEngineSettingValue = permissionsEngineSetting.getEngineSettingValue(OAuthType.TWITTER.name());
         
          if(clientIdEngineSettingValue != null
              && clientSecretEngineSetting != null
              && permissionsEngineSettingValue != null){
          final String clientId = clientIdEngineSettingValue.getValue();
View Full Code Here

    if(!requestUtil.hasKnownCustomerLogged(request)){
      try {

          // CLIENT ID
          EngineSetting clientIdEngineSetting = engineSettingService.getSettingOAuthAppKeyOrId();
          EngineSettingValue clientIdEngineSettingValue = clientIdEngineSetting.getEngineSettingValue(OAuthType.TWITTER.name());
         
          // CLIENT SECRET
          EngineSetting clientSecretEngineSetting = engineSettingService.getSettingOAuthAppSecret();
          EngineSettingValue clientSecretEngineSettingValue = clientSecretEngineSetting.getEngineSettingValue(OAuthType.TWITTER.name());
         
          // CLIENT PERMISSIONS
          EngineSetting permissionsEngineSetting = engineSettingService.getSettingOAuthAppPermissions();
          EngineSettingValue permissionsEngineSettingValue = permissionsEngineSetting.getEngineSettingValue(OAuthType.TWITTER.name());
         
          if(clientIdEngineSettingValue != null
              && clientSecretEngineSetting != null
              && permissionsEngineSettingValue != null){
          final String clientId = clientIdEngineSettingValue.getValue();
View Full Code Here

    if(!requestUtil.hasKnownCustomerLogged(request)){
      try {

          // CLIENT ID
          EngineSetting clientIdEngineSetting = engineSettingService.getSettingOAuthAppKeyOrId();
          EngineSettingValue clientIdEngineSettingValue = clientIdEngineSetting.getEngineSettingValue(OAuthType.GOOGLE_ACCOUNT.name());
         
          // CLIENT SECRET
          EngineSetting clientSecretEngineSetting = engineSettingService.getSettingOAuthAppSecret();
          EngineSettingValue clientSecretEngineSettingValue = clientSecretEngineSetting.getEngineSettingValue(OAuthType.GOOGLE_ACCOUNT.name());
         
          // CLIENT PERMISSIONS
          EngineSetting permissionsEngineSetting = engineSettingService.getSettingOAuthAppPermissions();
          EngineSettingValue permissionsEngineSettingValue = permissionsEngineSetting.getEngineSettingValue(OAuthType.GOOGLE_ACCOUNT.name());
         
          if(clientIdEngineSettingValue != null
              && clientSecretEngineSetting != null
              && permissionsEngineSettingValue != null){
          final String clientId = clientIdEngineSettingValue.getValue();
          final String clientSecret = clientSecretEngineSettingValue.getValue();
          final String permissions = permissionsEngineSettingValue.getValue();

                    final String googleAccountCallBackURL = urlService.buildAbsoluteUrl(requestData, urlService.buildOAuthCallBackUrl(requestData, OAuthType.GOOGLE_ACCOUNT.getPropertyKey().toLowerCase()));

                    OAuthService service = new ServiceBuilder()
                    .provider(Google2Api.class)
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.domain.EngineSettingValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.