Package org.apache.wicket.model

Examples of org.apache.wicket.model.StringResourceModel


                    PortletRegistry registry = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPortletRegistry();
                    PortletApplication app = registry.getPortletApplication(paNodeBean.getApplicationName());
                    PortletDefinition def = app.getPortlet(paNodeBean.getName());
                    def.setJetspeedSecurityConstraint("".equals(jetspeedSecurityConstraint) ? null : jetspeedSecurityConstraint);
                    registry.savePortletDefinition(def);
                    StringResourceModel resModel = new StringResourceModel("pam.details.action.status.portlet.saveOK", this, null, new Object [] { paNodeBean.getName() } );
                    feed.info(resModel.getString());
                }
                catch (FailedToStorePortletDefinitionException e)
                {
                    logger.error("Failed to retrieve jetspeed security constraint defs of 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());
                }
            }
        });
    }
View Full Code Here


                        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());
                    SecurityRoleRef secRoleRef = def.getSecurityRoleRef(securityRoleRef.getRoleName());
                   
                    if (secRoleRef != null)
                    {
                        for (Iterator<Description> it = secRoleRef.getDescriptions().iterator(); it.hasNext(); )
                        {
                            Description description = it.next();
                           
                            for (IModel<DescriptionBean> descriptionBeanModel : fields)
                            {
                                if (descriptionBeanModel.getObject().getLocale().equals(description.getLocale()))
                                {
                                    it.remove();
                                    break;
                                }
                            }
                        }
                   
                        registry.savePortletDefinition(def);
                       
                        StringResourceModel resModel = new StringResourceModel("pam.details.action.status.portlet.saveOK", this, null, new Object [] { paNodeBean.getName() } );
                        feed.info(resModel.getString());
                    }
                }
                catch (FailedToStorePortletDefinitionException 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());
                }
            }
        });

    }
View Full Code Here

        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());
        }

    }
View Full Code Here

                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());
                }
            }
        };
    }
View Full Code Here

                        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)
                            {
                                if (descriptionBeanModel.getObject().getLocale().equals(description.getLocale()))
                                {
                                    it.remove();
                                    break;
                                }
                            }
                        }
                   
                        registry.savePortletDefinition(def);
                       
                        StringResourceModel resModel = new StringResourceModel("pam.details.action.status.portlet.saveOK", this, null, new Object [] { paNodeBean.getName() } );
                        feed.info(resModel.getString());
                    }
                }
                catch (FailedToStorePortletDefinitionException 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());
                }
            }
        });

    }
View Full Code Here

        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());
        }

    }
View Full Code Here

                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());
                }
            }
        };
    }
View Full Code Here

                        newKeywords = null;
                        newLocale = null;
                    }

                    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("Exception occurred during updating portlet application or saving 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());
                }
            }
        };
    }
View Full Code Here

        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("Exception occurred during updating portlet application or saving 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());
        }
    }
View Full Code Here

                        newMimeType = null;
                        newPortletModes.clear();
                    }

                    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("Exception occurred during updating portlet application or saving 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());
                }
            }
        };
    }
View Full Code Here

TOP

Related Classes of org.apache.wicket.model.StringResourceModel

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.