Examples of InitParam


Examples of com.caucho.config.types.InitParam

  {
    _webApp = webApp;
   
    try {
      for (Map.Entry<String,String> entry : _contextParamMap.entrySet()) {
        InitParam initParam = new InitParam(entry.getKey(), entry.getValue());
        webApp.addContextParam(initParam);
      }

      for (BeanEmbed beanEmbed : _beanList) {
        beanEmbed.configure();
View Full Code Here

Examples of com.caucho.config.types.InitParam

  /**
   * Sets an init-param
   */
  public InitParam createInitParam()
  {
    InitParam initParam = new InitParam();

    initParam.setAllowEL(_allowEL);

    return initParam;
  }
View Full Code Here

Examples of com.caucho.config.types.InitParam

  /**
   * Sets an init-param
   */
  public InitParam createContextParam()
  {
    InitParam initParam = new InitParam();

    initParam.setAllowEL(_servletAllowEL);

    return initParam;
  }
View Full Code Here

Examples of com.caucho.config.types.InitParam

  /**
   * Sets an init-param
   */
  public InitParam createInitParam()
  {
    InitParam initParam = new InitParam();

    initParam.setAllowEL(_allowEL);

    return initParam;
  }
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.InitParam

       
        if (def != null)
        {
            if (type == InitParam.class)
            {
                InitParam param = def.getInitParam(name);
                description = param.getDescription(locale);
            }
            else if (type == SecurityRoleRef.class)
            {
                SecurityRoleRef securityRoleRef = def.getSecurityRoleRef(name);
                description = securityRoleRef.getDescription(locale);
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.InitParam

    @Override
    protected InitParam load()
    {
        PortletApplication app = locator.getPortletRegistry().getPortletApplication(paNodeBean.getApplicationName());
        PortletDefinition def = app.getPortlet(paNodeBean.getName());
        InitParam initParam = def.getInitParam(paramName);
        return initParam;
    }
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.InitParam

       
        // SECURITY filtering
        String uniqueName = pa.getName() + "::" + portlet.getPortletName();
        if (securityAccessController.checkPortletAccess(portlet, JetspeedActions.MASK_VIEW))
        {
            InitParam param = portlet.getInitParam(PORTLET_ICON);
            String image;
            if (param != null)
            {               
                //String relativeImagePath = param.getValue();
                //String context = muta.getWebApplicationDefinition().getContextRoot();
                // Have to use a supported icon in jetspeed, otherwise image can be out of skew
                String  imagePath = param.getParamValue();
                if (imagePath == null)
                {
                    image = DEFAULT_IMAGES[rand.nextInt(DEFAULT_IMAGES.length)];
                }
                else
                {
                    if (-1 == imagePath.indexOf("/"))
                        image = "images/portlets/" + param.getParamValue();
                    else
                        image = param.getParamValue();
                }
            }
            else
            {
                image = DEFAULT_IMAGES[rand.nextInt(DEFAULT_IMAGES.length)];
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.InitParam

            {
                PortletRegistry registry = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPortletRegistry();
                PortletApplication app = registry.getPortletApplication(paNodeBean.getApplicationName());
                PortletDefinition def = app.getPortlet(paNodeBean.getName());

                final InitParam param = def.getInitParam(initParam.getParamName());

                List<DescriptionBean> list = new ArrayList<DescriptionBean>();

                for (Description description : param.getDescriptions())
                {
                    list.add(new DescriptionBean(description));
                }

                return new ListDataProvider<DescriptionBean>(list);
            }
           
            @Override
            protected Button saveButton(String componentId)
            {
                return new Button(componentId)
                {

                    @Override
                    public void onSubmit()
                    {
                        PortletRegistry registry = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPortletRegistry();
                        PortletApplication app = registry.getPortletApplication(paNodeBean.getApplicationName());
                        PortletDefinition def = app.getPortlet(paNodeBean.getName());
                       
                        if (newLocale != null && newDescription != null)
                        {
                            InitParam param = def.getInitParam(initParam.getParamName());
                            Locale locale = new Locale(newLocale);
                            Description targetDescription = null;
                           
                            for (Description description : param.getDescriptions())
                            {
                                if (description.getLocale().equals(locale))
                                {
                                    targetDescription = description;
                                    break;
                                }
                            }
                           
                            if (targetDescription == null)
                            {
                                targetDescription = param.addDescription(newLocale);
                            }
                           
                            targetDescription.setDescription(newDescription);
                           
                            newLocale = null;
                            newDescription = null;
                        }

                        FeedbackPanel feed = (FeedbackPanel) getPage().get("feedback");
                       
                        try
                        {
                            registry.savePortletDefinition(def);
                            StringResourceModel resModel = new StringResourceModel("pam.details.action.status.portlet.saveOK", this, null, new Object [] { paNodeBean.getName() } );
                            feed.info(resModel.getString());
                        }
                        catch (RegistryException e)
                        {
                            logger.error("Failed to save portlet definition.", e);
                            StringResourceModel resModel = new StringResourceModel("pam.details.action.status.portlet.saveFailure", this, null, new Object [] { paNodeBean.getName(), e.getMessage() } );
                            feed.info(resModel.getString());
                        }
                    }
                };
            }

            @Override
            public void delete(IModel<DescriptionBean>[] fields)
            {
                FeedbackPanel feed = (FeedbackPanel) getPage().get("feedback");
               
                try
                {
                    PortletRegistry registry = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPortletRegistry();
                    PortletApplication app = registry.getPortletApplication(paNodeBean.getApplicationName());
                    PortletDefinition def = app.getPortlet(paNodeBean.getName());
                    InitParam initParam = def.getInitParam(name);
                   
                    if (initParam != null)
                    {
                        for (Iterator<Description> it = initParam.getDescriptions().iterator(); it.hasNext(); )
                        {
                            Description description = it.next();
                           
                            for (IModel<DescriptionBean> descriptionBeanModel : fields)
                            {
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.InitParam

        PortletDefinition def = app.getPortlet(paNodeBean.getName());

        Iterator<InitParam> it = def.getInitParams().iterator();
        while (it.hasNext())
        {
            InitParam initParam = it.next();
            String paramName = initParam.getParamName();
           
            for (IModel<InitParam> field : fields)
            {
                if (field.getObject().getParamName().equals(paramName))
                {
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.InitParam

                PortletApplication app = registry.getPortletApplication(paNodeBean.getApplicationName());
                PortletDefinition def = app.getPortlet(paNodeBean.getName());

                if (newName != null && newValue != null)
                {
                    InitParam param = def.addInitParam(newName);
                    param.setParamValue(newValue);

                    if (newLocale != null && newDescription != null)
                    {
                        Description desc = param.addDescription(newLocale);
                        desc.setDescription(newDescription);
                    }
                   
                    newName = null;
                    newValue = null;
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.