com.ibm.broker.config.proxy

Class BarEntry

  • java.lang.Object
    • com.ibm.broker.config.proxy.BarEntry
  • All Implemented Interfaces:
    DeployableObject


    public class BarEntry
    extends java.lang.Object
    implements DeployableObject
    Represents a file contained within a broker archive that can be deployed to an execution group.

    class com.ibm.broker.config.proxy.BarEntry implements com.ibm.broker.config.proxy.DeployableObject

    Responsibilities States that implementing classes represent objects that can be deployed to execution groups.
    Internal Collaborators None
    
     Change Activity:
     --------  ----------- -------------   ------------------------------------
     Reason:   Date:       Originator:     Comments:
     --------  ----------- -------------   ------------------------------------
     f45166    2007-06-11  HDMPL           v6.1 Release
     51619.8   2008-12-16  HDMPL           v7 Release (no changes)
     80006     2011-05-13  HDCAB           v8 release:                                        
                                             Added equals() method.
                                             Added getBytes() method.
                                             Added isApplication() method.
                                             Added isLibrary() method.
                                             Added getDeployableFileType() method.
                                             Added toString() method.
     
     
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object obj)
      Compares this BarEntry with the Object passed in.
      byte[] getBytes()
      Returns the bytes for this BarEntry.
      com.ibm.broker.config.common.DeployableFileType getDeployableFileType()
      Returns the DeployableFileType for this BarEntry.
      java.lang.String getFileExtension()
      Returns the file extension of the BAR entry.
      java.lang.String getFullName()
      Returns the name of the BarEntry as it exists in the BAR file- including any file extension but excluding any path information.
      java.lang.String[] getKeywords()
      Returns the set of keywords for this BarEntry which were found embedded in the object when the BarFile instance was first instantiated.
      java.lang.String getKeywordValue(java.lang.String keyword)
      Returns the value of the supplied keyword.
      java.util.Date getModifyTime()
      Returns the time that the BarEntry was last modified, according to the file modification date set in the broker archive file.
      java.lang.String getName()
      Returns the name of the BarEntry.
      java.lang.String getVersion()
      Returns the value of the 'version' keyword if it is embedded in the object in the Bar file.
      int hashCode()
      Returns a hash code value for this BarEntry.
      boolean isApplication()
      Returns true if this BAR entry is an Application
      boolean isLibrary()
      Returns true if this BAR entry is a Library
      boolean isSharedLibrary()
      Returns true if this BAR entry is a Shared Library
      java.lang.String toString()
      Returns a string representation of the object
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getFileExtension

        public java.lang.String getFileExtension()
        Returns the file extension of the BAR entry. The String returned is taken from the name of the file as it exists in the BAR file- from the first character after the last period ('.') to the end of the filename.
        Specified by:
        getFileExtension in interface DeployableObject
        Returns:
        String file extension, or the empty string if the file does not have any extension.
      • getFullName

        public java.lang.String getFullName()
        Returns the name of the BarEntry as it exists in the BAR file- including any file extension but excluding any path information.
        Specified by:
        getFullName in interface DeployableObject
        Returns:
        String name of the BarEntry
      • getKeywordValue

        public java.lang.String getKeywordValue(java.lang.String keyword)
        Returns the value of the supplied keyword. If the supplied keyword was not found in this BarEntry, this method returns null.
        Specified by:
        getKeywordValue in interface DeployableObject
        Parameters:
        keyword - The keyword to look up
        Returns:
        String value of the supplied keyword, or null if the keyword could not be found for the object.
      • getKeywords

        public java.lang.String[] getKeywords()
        Returns the set of keywords for this BarEntry which were found embedded in the object when the BarFile instance was first instantiated. Use BarEntry.getKeywordValue() to look up the value of a given keyword.
        Specified by:
        getKeywords in interface DeployableObject
        Returns:
        String[] the set of keywords that were found.
      • getModifyTime

        public java.util.Date getModifyTime()
        Returns the time that the BarEntry was last modified, according to the file modification date set in the broker archive file.
        Specified by:
        getModifyTime in interface DeployableObject
        Returns:
        Date the time of the most last modification.
      • getName

        public java.lang.String getName()
        Returns the name of the BarEntry. This is taken from the name of the file as it exists in the BAR file, up to but excluding the last period ('.').
        Specified by:
        getName in interface DeployableObject
        Returns:
        String name of the BarEntry
      • getVersion

        public java.lang.String getVersion()
        Returns the value of the 'version' keyword if it is embedded in the object in the Bar file. If no string is set the return value is null.
        Specified by:
        getVersion in interface DeployableObject
        Returns:
        String version information
      • getBytes

        public byte[] getBytes()
        Returns the bytes for this BarEntry.
        Returns:
        bytes[] bar file entry contents
      • getDeployableFileType

        public com.ibm.broker.config.common.DeployableFileType getDeployableFileType()
        Returns the DeployableFileType for this BarEntry.
        Returns:
        DeployableFileType bar file entry deployable file type
      • isApplication

        public boolean isApplication()
        Returns true if this BAR entry is an Application
        Returns:
        boolean true if this BAR entry is an application
      • isLibrary

        public boolean isLibrary()
        Returns true if this BAR entry is a Library
        Returns:
        boolean true if this BAR entry is a Library
      • isSharedLibrary

        public boolean isSharedLibrary()
        Returns true if this BAR entry is a Shared Library
        Returns:
        boolean true if this BAR entry is a Shared Library
      • equals

        public boolean equals(java.lang.Object obj)
        Compares this BarEntry with the Object passed in.

        Two instances of a BarEntry are equal if and only if they are both BarEntry objects and they have the same full name.

        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - - the object that is to be compared with this one.
        Returns:
        true if the two BarEntry objects are equal
      • hashCode

        public int hashCode()
        Returns a hash code value for this BarEntry.

        This method is supported for the benefit of hash tables such as the one used internally by BarFile.

        Overrides:
        hashCode in class java.lang.Object
        Returns:
        a hash code value for this object
      • toString

        public java.lang.String toString()
        Returns a string representation of the object

        Displays the name, number of BAR entries and deployment descriptor of the current object. The format is not guaranteed, and therefore should not be parsed programatically.

        Overrides:
        toString in class java.lang.Object
        Returns:
        String Representation of the current object