Class ServletDef

  • All Implemented Interfaces:
    java.io.Serializable

    public class ServletDef
    extends java.lang.Object
    implements java.io.Serializable
    Representation of a servlet definition for a web application, as represented in a <servlet> element in the deployment descriptor.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ServletDef()
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addInitParameter​(java.lang.String name, java.lang.String value)
      Add an initialization parameter to the set of parameters associated with this servlet.
      void addSecurityRoleRef​(SecurityRoleRef securityRoleRef)
      Add a security-role-ref to the set of security-role-refs associated with this servlet.
      java.lang.Boolean getAsyncSupported()
      Returns whether this servlet supports async processing.
      java.lang.String getDescription()
      Returns the description of this servlet.
      java.lang.String getDisplayName()
      Returns the display name of this servlet.
      java.lang.Boolean getEnabled()
      Returns whether this servlet is enabled.
      java.lang.String getJspFile()
      Returns the name of the JSP file to which this servlet definition applies.
      java.lang.String getLargeIcon()
      Returns the large icon associated with this servlet.
      java.lang.Integer getLoadOnStartup()
      Returns the load-on-startup order for this servlet.
      MultipartDef getMultipartDef()
      Returns the multipart configuration for this servlet.
      java.util.Map<java.lang.String,​java.lang.String> getParameterMap()
      Returns the set of initialization parameters for this servlet, keyed by parameter name.
      java.lang.String getRunAs()
      Returns the run-as configuration for this servlet.
      java.util.Set<SecurityRoleRef> getSecurityRoleRefs()
      Returns the set of security role references for this servlet.
      java.lang.String getServletClass()
      Returns the fully qualified name of the Java class that implements this servlet.
      java.lang.String getServletName()
      Returns the name of this servlet.
      java.lang.String getSmallIcon()
      Returns the small icon associated with this servlet.
      boolean isOverridable()
      Returns whether this ServletDef can be overridden by a Servlet Container Initializer.
      void setAsyncSupported​(java.lang.String asyncSupported)
      Sets whether this servlet supports async processing.
      void setDescription​(java.lang.String description)
      Sets the description of this servlet.
      void setDisplayName​(java.lang.String displayName)
      Sets the display name of this servlet.
      void setEnabled​(java.lang.String enabled)
      Sets whether this servlet is enabled.
      void setJspFile​(java.lang.String jspFile)
      Sets the name of the JSP file to which this servlet definition applies.
      void setLargeIcon​(java.lang.String largeIcon)
      Sets the large icon associated with this servlet.
      void setLoadOnStartup​(java.lang.String loadOnStartup)
      Sets the load-on-startup order for this servlet.
      void setMultipartDef​(MultipartDef multipartDef)
      Sets the multipart configuration for this servlet.
      void setOverridable​(boolean overridable)
      Sets whether this ServletDef can be overridden by a Servlet Container Initializer.
      void setRunAs​(java.lang.String runAs)
      Sets the run-as configuration for this servlet.
      void setServletClass​(java.lang.String servletClass)
      Sets the fully qualified name of the Java class that implements this servlet.
      void setServletName​(java.lang.String servletName)
      Sets the name of this servlet.
      void setSmallIcon​(java.lang.String smallIcon)
      Sets the small icon associated with this servlet.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServletDef

        public ServletDef()
        Default constructor.
    • Method Detail

      • getDescription

        public java.lang.String getDescription()
        Returns the description of this servlet.
        Returns:
        the description
      • setDescription

        public void setDescription​(java.lang.String description)
        Sets the description of this servlet.
        Parameters:
        description - the description
      • getDisplayName

        public java.lang.String getDisplayName()
        Returns the display name of this servlet.
        Returns:
        the display name
      • setDisplayName

        public void setDisplayName​(java.lang.String displayName)
        Sets the display name of this servlet.
        Parameters:
        displayName - the display name
      • getSmallIcon

        public java.lang.String getSmallIcon()
        Returns the small icon associated with this servlet.
        Returns:
        the small icon
      • setSmallIcon

        public void setSmallIcon​(java.lang.String smallIcon)
        Sets the small icon associated with this servlet.
        Parameters:
        smallIcon - the small icon
      • getLargeIcon

        public java.lang.String getLargeIcon()
        Returns the large icon associated with this servlet.
        Returns:
        the large icon
      • setLargeIcon

        public void setLargeIcon​(java.lang.String largeIcon)
        Sets the large icon associated with this servlet.
        Parameters:
        largeIcon - the large icon
      • getServletName

        public java.lang.String getServletName()
        Returns the name of this servlet.
        Returns:
        the servlet name
      • setServletName

        public void setServletName​(java.lang.String servletName)
        Sets the name of this servlet.
        Parameters:
        servletName - the servlet name
      • getServletClass

        public java.lang.String getServletClass()
        Returns the fully qualified name of the Java class that implements this servlet.
        Returns:
        the servlet class
      • setServletClass

        public void setServletClass​(java.lang.String servletClass)
        Sets the fully qualified name of the Java class that implements this servlet.
        Parameters:
        servletClass - the servlet class
      • getJspFile

        public java.lang.String getJspFile()
        Returns the name of the JSP file to which this servlet definition applies.
        Returns:
        the JSP file
      • setJspFile

        public void setJspFile​(java.lang.String jspFile)
        Sets the name of the JSP file to which this servlet definition applies.
        Parameters:
        jspFile - the JSP file
      • getParameterMap

        public java.util.Map<java.lang.String,​java.lang.String> getParameterMap()
        Returns the set of initialization parameters for this servlet, keyed by parameter name.
        Returns:
        the parameter map
      • addInitParameter

        public void addInitParameter​(java.lang.String name,
                                     java.lang.String value)
        Add an initialization parameter to the set of parameters associated with this servlet.
        Parameters:
        name - The initialisation parameter name
        value - The initialisation parameter value
      • getLoadOnStartup

        public java.lang.Integer getLoadOnStartup()
        Returns the load-on-startup order for this servlet.
        Returns:
        the load-on-startup order
      • setLoadOnStartup

        public void setLoadOnStartup​(java.lang.String loadOnStartup)
        Sets the load-on-startup order for this servlet.
        Parameters:
        loadOnStartup - the load-on-startup order as a string
      • getRunAs

        public java.lang.String getRunAs()
        Returns the run-as configuration for this servlet.
        Returns:
        the run-as role name
      • setRunAs

        public void setRunAs​(java.lang.String runAs)
        Sets the run-as configuration for this servlet.
        Parameters:
        runAs - the run-as role name
      • getSecurityRoleRefs

        public java.util.Set<SecurityRoleRef> getSecurityRoleRefs()
        Returns the set of security role references for this servlet.
        Returns:
        the security role references
      • addSecurityRoleRef

        public void addSecurityRoleRef​(SecurityRoleRef securityRoleRef)
        Add a security-role-ref to the set of security-role-refs associated with this servlet.
        Parameters:
        securityRoleRef - The security role
      • getMultipartDef

        public MultipartDef getMultipartDef()
        Returns the multipart configuration for this servlet.
        Returns:
        the multipart configuration
      • setMultipartDef

        public void setMultipartDef​(MultipartDef multipartDef)
        Sets the multipart configuration for this servlet.
        Parameters:
        multipartDef - the multipart configuration
      • getAsyncSupported

        public java.lang.Boolean getAsyncSupported()
        Returns whether this servlet supports async processing.
        Returns:
        whether async is supported
      • setAsyncSupported

        public void setAsyncSupported​(java.lang.String asyncSupported)
        Sets whether this servlet supports async processing.
        Parameters:
        asyncSupported - whether async is supported as a string
      • getEnabled

        public java.lang.Boolean getEnabled()
        Returns whether this servlet is enabled.
        Returns:
        whether the servlet is enabled
      • setEnabled

        public void setEnabled​(java.lang.String enabled)
        Sets whether this servlet is enabled.
        Parameters:
        enabled - whether the servlet is enabled as a string
      • isOverridable

        public boolean isOverridable()
        Returns whether this ServletDef can be overridden by a Servlet Container Initializer.
        Returns:
        whether the servlet definition is overridable
      • setOverridable

        public void setOverridable​(boolean overridable)
        Sets whether this ServletDef can be overridden by a Servlet Container Initializer.
        Parameters:
        overridable - whether the servlet definition is overridable