Class ResourceAttributes

    • Constructor Detail

      • ResourceAttributes

        public ResourceAttributes()
        Default constructor.
      • ResourceAttributes

        public ResourceAttributes​(Attributes attributes)
        Merges with another attribute set.
    • Method Detail

      • isCollection

        public boolean isCollection()
        Is collection.
      • setCollection

        public void setCollection​(boolean collection)
        Set collection flag.
      • getContentLength

        public long getContentLength()
        Get content length.
        Returns:
        content length value
      • setContentLength

        public void setContentLength​(long contentLength)
        Set content length.
        Parameters:
        contentLength - New content length value
      • getCreation

        public long getCreation()
        Get creation time.
        Returns:
        creation time value
      • setCreation

        public void setCreation​(long creation)
        Set creation.
        Parameters:
        creation - New creation value
      • getCreationDate

        public Date getCreationDate()
        Get creation date.
        Returns:
        Creation date value
      • setCreationDate

        public void setCreationDate​(Date creationDate)
        Creation date mutator.
        Parameters:
        creationDate - New creation date
      • getLastModified

        public long getLastModified()
        Get last modified time.
        Returns:
        lastModified time value
      • setLastModified

        public void setLastModified​(long lastModified)
        Set last modified.
        Parameters:
        lastModified - New last modified value
      • setLastModified

        public void setLastModified​(Date lastModified)
        Deprecated.
        Set last modified date.
        Parameters:
        lastModified - New last modified date value
      • getLastModifiedDate

        public Date getLastModifiedDate()
        Get lastModified date.
        Returns:
        LastModified date value
      • setLastModifiedDate

        public void setLastModifiedDate​(Date lastModifiedDate)
        Last modified date mutator.
        Parameters:
        lastModifiedDate - New last modified date
      • getLastModifiedHttp

        public String getLastModifiedHttp()
        Returns:
        Returns the lastModifiedHttp.
      • getCreationOrLastModifiedDate

        public Date getCreationOrLastModifiedDate()
        Returns:
        the creation or lastModified date
      • setLastModifiedHttp

        public void setLastModifiedHttp​(String lastModifiedHttp)
        Parameters:
        lastModifiedHttp - The lastModifiedHttp to set.
      • getMimeType

        public String getMimeType()
        Returns:
        Returns the mimeType.
      • setMimeType

        public void setMimeType​(String mimeType)
        Parameters:
        mimeType - The mimeType to set.
      • isMimeTypeInitialized

        public boolean isMimeTypeInitialized()
      • getName

        public String getName()
        Get name.
        Returns:
        Name value
      • setName

        public void setName​(String name)
        Set name.
        Parameters:
        name - New name value
      • getResourceType

        public String getResourceType()
        Get resource type.
        Returns:
        String resource type
      • setResourceType

        public void setResourceType​(String resourceType)
        Type mutator.
        Parameters:
        resourceType - New resource type
      • getETag

        public String getETag()
        Get ETag.
        Returns:
        strong ETag if available, else weak ETag
      • getETag

        public String getETag​(boolean strong)
        Deprecated.
        Get ETag.
        Parameters:
        strong - Ignored
        Returns:
        strong ETag if available, else weak ETag.
      • setETag

        public void setETag​(String eTag)
        Set strong ETag.
      • getCanonicalPath

        public String getCanonicalPath()
        Return the canonical path of the resource, to possibly be used for direct file serving. Implementations which support this should override it to return the file path.
        Returns:
        The canonical path of the resource
      • size

        public int size()
        Retrieves the number of attributes in the attribute set.
        Specified by:
        size in interface Attributes
      • isCaseIgnored

        public boolean isCaseIgnored()
        Case sensitivity.
        Specified by:
        isCaseIgnored in interface Attributes