Examples of ApplicationConfig


Examples of com.multysite.entity.admin.ApplicationConfig

  public void doGet(HttpServletRequest req, HttpServletResponse resp)
      throws IOException {
    try {
      ApplicationTemplate template = (ApplicationTemplate) req
          .getAttribute("template");
      ApplicationConfig config = (ApplicationConfig) req
          .getAttribute("config");
      if (template != null && config != null) {
        /*
         * get detail content
         */
        String alias = req.getRequestURI().replace("/", "")
            .replace(".html", "");
        alias = URLDecoder.decode(alias, "UTF-8");
        if (treeCache.containsKey(alias)) {
          log.warning("-------detail cached -----");
          resp.getWriter().print(treeCache.get(alias));
        } else {
          log.warning("-------detail no cache -----");
          News obj = NewsModel.getById(alias);
          if (obj != null) {
            CategoryModel cateModel = new CategoryModel();
            cateModel.prepareAll();
            TagModel tagModel = new TagModel();
            tagModel.prepareList();
            CompiledScript compiledscript = CompileScriptEngine
                .getCompileScript(config.getApplicationId(),
                    "detail", template.getDetail());

            Bindings bind = compiledscript.getEngine().getBindings(
                ScriptContext.ENGINE_SCOPE);
            bind.put("title_for_layout", config.getTitle());
            bind.put("description_for_layout",
                config.getDescription());
            bind.put("keyword_for_layout", config.getKeyword());
            bind.put("css_for_layout", template.getCss());
            bind.put("js_for_layout", template.getJs());

            RecentViewHelper.addRecentView(obj);
            bind.put("recent_view",
View Full Code Here

Examples of com.multysite.entity.admin.ApplicationConfig

      throws IOException {
    try {
      req.setCharacterEncoding("utf-8");
      ApplicationTemplate template = (ApplicationTemplate) req
          .getAttribute("template");
      ApplicationConfig config = (ApplicationConfig) req
          .getAttribute("config");
      if (template != null && config != null) {
        NewsModel model = new NewsModel();
        model.setLimit(500);
        model.prepareList();
View Full Code Here

Examples of com.multysite.entity.admin.ApplicationConfig

  @Override
  protected void doPost(HttpServletRequest req, HttpServletResponse resp)
      throws ServletException, IOException {
    String ns = NamespaceManager.get();
    ApplicationConfig config = ApplicationConfigModel.getById(ns, ns);
    ApplicationTemplate template = ApplicationTemplateModel.getById(ns,
        config.getTemplateId());
    String action = req.getParameter("action");
    String value = req.getParameter("pageValue");
    if (action != null && action.equals("homePage")) {
      template.setHome(value);
    } else if (action != null && action.equals("detailPage")) {
View Full Code Here

Examples of com.multysite.entity.admin.ApplicationConfig

          String subDomain = siteName.replace("." + Setting.getDomain(),
              "");
          Application obj = ApplicationModel.getById(subDomain);
          if (obj != null) {
            try {
              ApplicationConfig config = ApplicationConfigModel
                  .getById(obj.getId(), obj.getId());
              ApplicationTemplate template = ApplicationTemplateModel
                  .getById(obj.getId(), config.getTemplateId());
              NamespaceManager.set(obj.getId());
              if (config != null && template != null) {
                request.setAttribute("template", template);
                request.setAttribute("config", config);
              } else {
                response.getWriter().print(
                    "Please try again later !");
                log.warning("Config or template are null !");
              }
            } catch (Exception e) {
              response.getWriter().print("Please try again later !");
              log.warning(e.toString());
            }
          } else {
            NamespaceManager.set(Setting.getGeneralNamespace());
          }
        } else {
          siteName = siteName.replace("http://", "");
          siteName = siteName.replace("www.", "");
          log.warning("---------------->------>" + siteName);
          ApplicationMapping mapping = ApplicationMappingModel
              .getById(siteName);
          if (mapping != null) {
            try {
              Application obj = ApplicationModel.getById(mapping
                  .getApplicationId());
              if (obj != null) {
                ApplicationConfig config = ApplicationConfigModel
                    .getById(obj.getId(), obj.getId());
                ApplicationTemplate template = ApplicationTemplateModel
                    .getById(obj.getId(),
                        config.getTemplateId());
                NamespaceManager.set(mapping.getApplicationId());
                if (config != null && template != null) {
                  request.setAttribute("template", template);
                  request.setAttribute("config", config);
                } else {
View Full Code Here

Examples of com.multysite.entity.admin.ApplicationConfig

      throws IOException {
    try {
      req.setCharacterEncoding("utf-8");
      ApplicationTemplate template = (ApplicationTemplate) req
          .getAttribute("template");
      ApplicationConfig config = (ApplicationConfig) req
          .getAttribute("config");
      if (template != null && config != null) {
        /*
         * get detail content
         */
        String[] splitted = req.getRequestURI().split("/");
        if (splitted.length == 3) {
          boolean check = false;
          String categoryAlias = splitted[2];
          categoryAlias = URLDecoder.decode(categoryAlias, "UTF-8");
          Category obj = CategoryModel.getById(categoryAlias);
          if (obj != null || check == false) {

            CompiledScript compiledscript = CompileScriptEngine
                .getCompileScript(config.getApplicationId(),
                    "category", template.getCategory());
            Bindings bind = compiledscript.getEngine().getBindings(
                ScriptContext.ENGINE_SCOPE);
            bind.put("title_for_layout", config.getTitle());
            bind.put("description_for_layout",
                config.getDescription());
            bind.put("keyword_for_layout", config.getKeyword());
            bind.put("css_for_layout", template.getCss());
            bind.put("js_for_layout", template.getJs());

            int page = 1;
            try {
View Full Code Here

Examples of com.porterhead.rest.config.ApplicationConfig

        };
        validator = Validation.buildDefaultValidatorFactory().getValidator();

        userRepository = mock(UserRepository.class);
        tokenRepository = mock(VerificationTokenRepository.class);
        ApplicationConfig config = mock(ApplicationConfig.class);
        verificationTokenService = new VerificationTokenServiceImpl(userRepository, tokenRepository,
                emailServicesGateway, validator);
        ((VerificationTokenServiceImpl)verificationTokenService).setConfig(config);
        when(config.getHostNameUrl()).thenReturn(new String("http://localhost:8080"));
        when(config.getLostPasswordTokenExpiryTimeInMinutes()).thenReturn(120);
        when(config.getEmailVerificationTokenExpiryTimeInMinutes()).thenReturn(120);
        when(config.getEmailRegistrationTokenExpiryTimeInMinutes()).thenReturn(120);
    }
View Full Code Here

Examples of com.scooterframework.admin.ApplicationConfig

    System.setProperty(Constants.ALLOW_CLASSWORK, "true");
   
    //ApplicationConfig.noConsoleDisplay = true;
    //LogUtil.manualStopOn();
   
    ApplicationConfig ac = ApplicationConfig.configInstanceForApp();
    ac.startApplication();
    ac.endApplication();
  }
View Full Code Here

Examples of npanday.artifact.ApplicationConfig

            artifact.getType().equals( ArtifactType.SHARP_DEVELOP_ADDIN.getPackagingType() ) )
        {
            List<Dependency> dependencies = project.getDependencies();
            if ( ArtifactTypeHelper.isDotnetExecutable( artifact.getType() ) )
            {
                ApplicationConfig applicationConfig = artifactContext.getApplicationConfigFor( artifact );
              //  File configExeFile = new File( applicationConfig.getConfigDestinationPath() );
                /*
                if ( configExeFile.exists() )
                {
                    Dependency dependency = new Dependency();
View Full Code Here

Examples of org.apache.struts.config.ApplicationConfig

        /* FIXME for Struts 1.2
           Since Struts 1.1 only has one implementation for
           ModuleConfig casting is safe here. Used only for
           transition purposes !
        */
        return new ApplicationConfig((ModuleConfigImpl)getModuleConfig(request));
    }
View Full Code Here

Examples of org.jmanage.core.config.ApplicationConfig

    public AttributeListData[] getAttributes(ServiceContext context,
                                             String[] attributes,
                                             boolean handleCluster)
            throws ServiceException {
        canAccessThisMBean(context);
        ApplicationConfig appConfig = context.getApplicationConfig();
        ObjectName objectName = context.getObjectName();

        AttributeListData[] resultData = null;
        if(appConfig.isCluster()){
            if(!handleCluster){
                throw new ServiceException(ErrorCodes.OPERATION_NOT_SUPPORTED_FOR_CLUSTER);
            }
            /* we need to perform this operation for all servers
                in this cluster */
            resultData = new AttributeListData[appConfig.getApplications().size()];
            int index = 0;
            for(Iterator it=appConfig.getApplications().iterator(); it.hasNext(); index++){
                ApplicationConfig childAppConfig = (ApplicationConfig)it.next();
                try {
                    resultData[index] =
                            getAttributes(context,
                                    childAppConfig, objectName, attributes);
                } catch (ConnectionFailedException e) {
                    resultData[index] =
                            new AttributeListData(childAppConfig.getName());
                }
            }
        }else{
            resultData = new AttributeListData[1];
            resultData[0] =
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.