Coverage report

  %line %branch
org.apache.jetspeed.om.portlet.impl.FragmentPortletDefinition
0% 
0% 

 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 3  
  * contributor license agreements.  See the NOTICE file distributed with
 4  
  * this work for additional information regarding copyright ownership.
 5  
  * The ASF licenses this file to You under the Apache License, Version 2.0
 6  
  * (the "License"); you may not use this file except in compliance with
 7  
  * the License.  You may obtain a copy of the License at
 8  
  * 
 9  
  *      http://www.apache.org/licenses/LICENSE-2.0
 10  
  * 
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 package org.apache.jetspeed.om.portlet.impl;
 18  
 
 19  
 import java.io.IOException;
 20  
 import java.util.Collection;
 21  
 import java.util.Locale;
 22  
 
 23  
 import org.apache.jetspeed.om.common.GenericMetadata;
 24  
 import org.apache.jetspeed.om.common.ParameterComposite;
 25  
 import org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite;
 26  
 import org.apache.jetspeed.om.common.preference.PreferenceComposite;
 27  
 import org.apache.jetspeed.om.common.preference.PreferenceSetComposite;
 28  
 import org.apache.jetspeed.om.page.Fragment;
 29  
 import org.apache.jetspeed.om.preference.impl.FragmentPortletPreferenceSet;
 30  
 import org.apache.pluto.om.common.Description;
 31  
 import org.apache.pluto.om.common.DescriptionSet;
 32  
 import org.apache.pluto.om.common.DisplayName;
 33  
 import org.apache.pluto.om.common.DisplayNameSet;
 34  
 import org.apache.pluto.om.common.Language;
 35  
 import org.apache.pluto.om.common.LanguageSet;
 36  
 import org.apache.pluto.om.common.ObjectID;
 37  
 import org.apache.pluto.om.common.ParameterSet;
 38  
 import org.apache.pluto.om.common.Preference;
 39  
 import org.apache.pluto.om.common.PreferenceSet;
 40  
 import org.apache.pluto.om.common.SecurityRoleRef;
 41  
 import org.apache.pluto.om.common.SecurityRoleRefSet;
 42  
 import org.apache.pluto.om.portlet.ContentType;
 43  
 import org.apache.pluto.om.portlet.ContentTypeSet;
 44  
 import org.apache.pluto.om.portlet.PortletApplicationDefinition;
 45  
 import org.apache.pluto.om.servlet.ServletDefinition;
 46  
 
 47  
 /**
 48  
  * Per-request wrapper for a PortletDefinition that allows for
 49  
  * the supplementaton of psml-based portlet Preferences. 
 50  
  * The Preferences are transparently accessed as default Preferences in
 51  
  * the exact same way default Preferences that are provided via the portelt.xml
 52  
  * are. 
 53  
  * 
 54  
  * @author <href a="mailto:weaver@apache.org">Scott T. Weaver</a>
 55  
  *
 56  
  */
 57  
 public class FragmentPortletDefinition implements PortletDefinitionComposite
 58  
 {
 59  
     private final PortletDefinitionComposite portletDefinition;
 60  
     private final Fragment fragment;
 61  
     
 62  
     public FragmentPortletDefinition(PortletDefinitionComposite portletDefinition, Fragment fragment)
 63  0
     {
 64  0
         this.portletDefinition = portletDefinition;
 65  0
         this.fragment = fragment;
 66  0
     }
 67  
 
 68  
     public void addContentType(ContentType cType)
 69  
     {
 70  0
         portletDefinition.addContentType(cType);
 71  0
     }
 72  
 
 73  
     public void addContentType(String contentType, Collection modes)
 74  
     {
 75  0
         portletDefinition.addContentType(contentType, modes);
 76  0
     }
 77  
 
 78  
     public void addDescription(Locale locale, String description)
 79  
     {
 80  0
         portletDefinition.addDescription(locale, description);
 81  0
     }
 82  
 
 83  
     public void addDisplayName(DisplayName displayName)
 84  
     {
 85  0
         portletDefinition.addDisplayName(displayName);
 86  0
     }
 87  
 
 88  
     public void addDisplayName(Locale locale, String displayName)
 89  
     {
 90  0
         portletDefinition.addDisplayName(locale, displayName);
 91  0
     }
 92  
 
 93  
     public ParameterComposite addInitParameter(String name, String value, DescriptionSet description)
 94  
     {
 95  0
         return portletDefinition.addInitParameter(name, value, description);
 96  
     }
 97  
 
 98  
     public ParameterComposite addInitParameter(String name, String value, String description, Locale locale)
 99  
     {
 100  0
         return portletDefinition.addInitParameter(name, value, description, locale);
 101  
     }
 102  
 
 103  
     public ParameterComposite addInitParameter(String name, String value)
 104  
     {
 105  0
         return portletDefinition.addInitParameter(name, value);
 106  
     }
 107  
 
 108  
     public void addLanguage(Language lang)
 109  
     {
 110  0
         portletDefinition.addLanguage(lang);
 111  0
     }
 112  
 
 113  
     public void addLanguage(String title, String shortTitle, String keywords, Locale locale)
 114  
     {
 115  0
         portletDefinition.addLanguage(title, shortTitle, keywords, locale);
 116  0
     }
 117  
 
 118  
     public void addPreference(Preference preference)
 119  
     {
 120  0
         portletDefinition.addPreference(preference);
 121  0
     }
 122  
 
 123  
     public PreferenceComposite addPreference(String name, String[] values)
 124  
     {
 125  0
         return portletDefinition.addPreference(name, values);
 126  
     }
 127  
 
 128  
     public void addSecurityRoleRef(SecurityRoleRef securityRef)
 129  
     {
 130  0
         portletDefinition.addSecurityRoleRef(securityRef);
 131  0
     }
 132  
 
 133  
     public SecurityRoleRef addSecurityRoleRef(String roleName, String roleLink)
 134  
     {
 135  0
         return portletDefinition.addSecurityRoleRef(roleName, roleLink);
 136  
     }
 137  
 
 138  
     public String getClassName()
 139  
     {
 140  0
         return portletDefinition.getClassName();
 141  
     }
 142  
 
 143  
     public ContentTypeSet getContentTypeSet()
 144  
     {
 145  0
         return portletDefinition.getContentTypeSet();
 146  
     }
 147  
 
 148  
     public Description getDescription(Locale arg0)
 149  
     {
 150  0
         return portletDefinition.getDescription(arg0);
 151  
     }
 152  
 
 153  
     public DescriptionSet getDescriptionSet()
 154  
     {
 155  0
         return portletDefinition.getDescriptionSet();
 156  
     }
 157  
 
 158  
     public String getDescriptionText(Locale locale)
 159  
     {
 160  0
         return portletDefinition.getDescriptionText(locale);
 161  
     }
 162  
 
 163  
     public DisplayName getDisplayName(Locale arg0)
 164  
     {
 165  0
         return portletDefinition.getDisplayName(arg0);
 166  
     }
 167  
 
 168  
     public DisplayNameSet getDisplayNameSet()
 169  
     {
 170  0
         return portletDefinition.getDisplayNameSet();
 171  
     }
 172  
 
 173  
     public String getDisplayNameText(Locale locale)
 174  
     {
 175  0
         return portletDefinition.getDisplayNameText(locale);
 176  
     }
 177  
 
 178  
     public String getExpirationCache()
 179  
     {
 180  0
         return portletDefinition.getExpirationCache();
 181  
     }
 182  
 
 183  
     public ObjectID getId()
 184  
     {
 185  0
         return portletDefinition.getId();
 186  
     }
 187  
 
 188  
     public ParameterSet getInitParameterSet()
 189  
     {
 190  0
         return portletDefinition.getInitParameterSet();
 191  
     }
 192  
 
 193  
     public SecurityRoleRefSet getInitSecurityRoleRefSet()
 194  
     {
 195  0
         return portletDefinition.getInitSecurityRoleRefSet();
 196  
     }
 197  
 
 198  
     public LanguageSet getLanguageSet()
 199  
     {
 200  0
         return portletDefinition.getLanguageSet();
 201  
     }
 202  
 
 203  
     public GenericMetadata getMetadata()
 204  
     {
 205  0
         return portletDefinition.getMetadata();
 206  
     }
 207  
 
 208  
     public String getName()
 209  
     {
 210  0
         return portletDefinition.getName();
 211  
     }
 212  
 
 213  
     public PortletApplicationDefinition getPortletApplicationDefinition()
 214  
     {
 215  0
         return portletDefinition.getPortletApplicationDefinition();
 216  
     }
 217  
 
 218  
     public ClassLoader getPortletClassLoader()
 219  
     {
 220  0
         return portletDefinition.getPortletClassLoader();
 221  
     }
 222  
 
 223  
     public String getPortletIdentifier()
 224  
     {
 225  0
         return portletDefinition.getPortletIdentifier();
 226  
     }
 227  
 
 228  
     public PreferenceSet getPreferenceSet()
 229  
     {
 230  0
         return new FragmentPortletPreferenceSet((PreferenceSetComposite) portletDefinition.getPreferenceSet(), fragment);
 231  
     }
 232  
 
 233  
     public String getPreferenceValidatorClassname()
 234  
     {
 235  0
         return portletDefinition.getPreferenceValidatorClassname();
 236  
     }
 237  
 
 238  
     public String getResourceBundle()
 239  
     {
 240  0
         return portletDefinition.getResourceBundle();
 241  
     }
 242  
 
 243  
     public ServletDefinition getServletDefinition()
 244  
     {
 245  0
         return portletDefinition.getServletDefinition();
 246  
     }
 247  
 
 248  
     public Collection getSupportedLocales()
 249  
     {
 250  0
         return portletDefinition.getSupportedLocales();
 251  
     }
 252  
 
 253  
     public String getUniqueName()
 254  
     {
 255  0
         return portletDefinition.getUniqueName();
 256  
     }
 257  
 
 258  
     public void setClassName(String arg0)
 259  
     {
 260  0
         portletDefinition.setClassName(arg0);
 261  0
     }
 262  
 
 263  
     public void setContentTypeSet(ContentTypeSet contentTypes)
 264  
     {
 265  0
         portletDefinition.setContentTypeSet(contentTypes);
 266  0
     }
 267  
 
 268  
     public void setDescriptions(DescriptionSet arg0)
 269  
     {
 270  0
         portletDefinition.setDescriptions(arg0);
 271  0
     }
 272  
 
 273  
     public void setDisplayNames(DisplayNameSet arg0)
 274  
     {
 275  0
         portletDefinition.setDisplayNames(arg0);
 276  0
     }
 277  
 
 278  
     public void setExpirationCache(String cache)
 279  
     {
 280  0
         portletDefinition.setExpirationCache(cache);
 281  0
     }
 282  
 
 283  
     public void setId(String arg0)
 284  
     {
 285  0
         portletDefinition.setId(arg0);
 286  0
     }
 287  
 
 288  
     public void setInitParameterSet(ParameterSet parameters)
 289  
     {
 290  0
         portletDefinition.setInitParameterSet(parameters);
 291  0
     }
 292  
 
 293  
     public void setInitSecurityRoleRefSet(SecurityRoleRefSet securityRefs)
 294  
     {
 295  0
         portletDefinition.setInitSecurityRoleRefSet(securityRefs);
 296  0
     }
 297  
 
 298  
     public void setLanguageSet(LanguageSet languages)
 299  
     {
 300  0
         portletDefinition.setLanguageSet(languages);
 301  0
     }
 302  
 
 303  
     public void setMetadata(GenericMetadata metadata)
 304  
     {
 305  0
         portletDefinition.setMetadata(metadata);
 306  0
     }
 307  
 
 308  
     public void setName(String arg0)
 309  
     {
 310  0
         portletDefinition.setName(arg0);
 311  0
     }
 312  
 
 313  
     public void setPortletApplicationDefinition(PortletApplicationDefinition pad)
 314  
     {
 315  0
         portletDefinition.setPortletApplicationDefinition(pad);
 316  0
     }
 317  
 
 318  
     public void setPortletClassLoader(ClassLoader arg0)
 319  
     {
 320  0
         portletDefinition.setPortletClassLoader(arg0);
 321  0
     }
 322  
 
 323  
     public void setPortletIdentifier(String portletIndentifier)
 324  
     {
 325  0
         portletDefinition.setPortletIdentifier(portletIndentifier);
 326  0
     }
 327  
 
 328  
     public void setPreferenceSet(PreferenceSet preferences)
 329  
     {
 330  0
         portletDefinition.setPreferenceSet(preferences);
 331  0
     }
 332  
 
 333  
     public void setPreferenceValidatorClassname(String classname)
 334  
     {
 335  0
         portletDefinition.setPreferenceValidatorClassname(classname);
 336  0
     }
 337  
 
 338  
     public void store() throws IOException
 339  
     {
 340  0
         portletDefinition.store();
 341  0
     }
 342  
     
 343  
     public String getJetspeedSecurityConstraint()
 344  
     {
 345  0
         return portletDefinition.getJetspeedSecurityConstraint();
 346  
     }
 347  
 
 348  
     public void setJetspeedSecurityConstraint(String constraint)
 349  
     {
 350  0
         portletDefinition.setJetspeedSecurityConstraint(constraint);
 351  0
     }
 352  
     
 353  
 }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.