javax.portlet.annotations.PortletConfiguration Maven / Gradle / Ivy
Show all versions of portlet-api Show documentation
/* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*
* This source code implements specifications defined by the Java
* Community Process. In order to remain compliant with the specification
* DO NOT add / change / or delete method signatures!
*/
package javax.portlet.annotations;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
/**
*
* Annotation for the portlet configuration.
* Many of these configuration parameters also appear in
* the portlet deployment descriptor.
*
* The portlet deployment descriptor can continue to be used.
* Values of configuration parameters appearing in the deployment descriptor have
* precedence over the corresponding values defined in the annotation.
*
*/
@Retention(RUNTIME) @Target({TYPE})
public @interface PortletConfiguration {
/**
* The portlet name for the annotated type.
*
* @return The portlet name
*/
String portletName();
/**
* The portlet initialization parameters.
*
* @return An array of initialization parameters
*/
InitParameter[] initParams() default {};
/**
* The portlet container runtime options.
*
* @return An array of portlet runtime options
*/
RuntimeOption[] runtimeOptions() default {};
/**
*
* The locales supported by the portlet.
* An array of String values, each of which represents a single locale.
*
* The locale is specified as a language tag as defined in
* IETF BCP 47, "Tags for Identifying Languages".
*
*
* @see java.util.Locale
* @see java.util.Locale#forLanguageTag forLanguageTag
* @see IETF BCP 47
*
* @return An array of language tag strings
*/
String[] supportedLocales() default {"en"};
/**
*
* Locale specific static title for this portlet.
*
*
* @return The portlet title
*/
LocaleString[] title() default {};
/**
*
* Locale specific short version of the static title.
*
*
* @return The short title
*/
LocaleString[] shortTitle() default {};
/**
*
* The display-name type contains a locale-specific short name that is intended to be displayed by tools.
* It is used by display-name elements.
* The display name need not be unique.
*
*
* @return The display name
*/
LocaleString[] displayName() default {};
/**
*
* The portlet description.
* It provides locale-specific text describing the portlet for use by the portal application or by tools.
*
*
* @return The portlet description
*/
LocaleString[] description() default {};
/**
*
* Locale specific keywords associated with this portlet.
* The keywords are separated by commas within the value of the
* LocaleString
array element.
*
*
* @return The keywords
*/
LocaleString[] keywords() default {};
/**
*
* The portlet preferences.
*
*
* @return The portlet preferences
*/
Preference[] prefs() default {};
/**
*
* The public render parameter identifiers used by the portlet.
*
*
* @return The array of public render parameters.
*/
String[] publicParams() default {};
/**
*
* The resource bundle name for this portlet.
* Name of the resource bundle containing the language specific
* portlet information in different languages.
*
* the file name is specified without
* the language specific part (e.g. _en) or the file extension.
*
*
* @return The resource bundle name
*/
String resourceBundle() default "";
/**
*
* The supported portlet modes and window states for a given MIME
type.
*
*
* @return The supported portlet modes and window states
*/
Supports[] supports() default {@Supports(mimeType="text/html")};
/**
*
* The cache scope, which defines whether generated portlet content is private
* for the user or can be shared across different users.
*
* If this field is set to TRUE
, cached information can be shared
* between users.
* Otherwise cached information will be considered private
* to the user.
*
* This value is set before the annotated method is called.
*
*
* @return The cache scope
*/
boolean cacheScopePublic() default false;
/**
*
* Expiration-time defines the time in seconds after which the portlet output expires.
* A value of -1 indicates that the output never expires.
*
* This value is set before the annotated method is called.
*
*
* @return The expiration time
*/
int cacheExpirationTime() default 0;
/**
*
* The dependencies the portlet may have on external resources.
* The resources can represent client-side prerequisites such as JavaScript libraries
* or stylesheet resources that are shared among portlets.
*
*
* @return The dependencies
*/
Dependency[] dependencies() default {};
/**
*
* The security role references.
*
*
* @return The security role references
*/
SecurityRoleRef[] roleRefs() default {};
/**
* Declares whether the portlet supports asynchronous operation mode.
*
* If this flag is set, any resource method used by this portlet will
* be marked as supporting asynchronous operation.
* Asynchronous support applies to resource methods only.
*
* @return true
if the method supports asynchronous mode.
*/
boolean asyncSupported() default false;
/**
* Provides multipart configuration data for the portlet.
*
* The {@literal @}Multipart
annotation supported
* element must be set to true
to activate multipart form support.
*
* @return The multipart configuration data.
*/
Multipart multipart() default @Multipart(supported=false);
}