org.codehaus.mojo.rpm
Class Mapping

java.lang.Object
  extended by org.codehaus.mojo.rpm.Mapping

public class Mapping
extends java.lang.Object

A description of a file or directory to be installed. It includes the properties to be assigned and the location(s) where the file(s) can be found for packaging.

Version:
$Id: Mapping.java 6588 2008-03-28 12:22:57Z bentmann $

Constructor Summary
Mapping()
           
 
Method Summary
 ArtifactMap getArtifact()
          Retrieve the artifact specification.
 java.lang.String getAttrString()
          Assemble the RPM SPEC file attributes for a mapping.
 Dependency getDependency()
          Retrieve the dependency specification.
 java.lang.String getDestination()
          Return the destination directory name.
 java.lang.String getDirectory()
          Retrieve the destination during package installation.
 java.lang.String getFilemode()
          Retrieve the UNIX file permissions.
 java.lang.String getGroupname()
          Retrieve the UNIX group name to own the installed files.
 java.util.List getSources()
          Retrieve the list of source file specifications.
 java.lang.String getUsername()
          Retrieve the UNIX user name to own the installed files.
 boolean isConfiguration()
          Retrieve the configuration status.
 boolean isDirOnly()
          Return directory-only status.
 boolean isDocumentation()
          Retrieve the documentation status.
 void setArtifact(ArtifactMap am)
          Set the artifact specification.
 void setConfiguration(boolean isCfg)
          Set the configuration status.
 void setDependency(Dependency am)
          Set the dependency specification.
 void setDirectory(java.lang.String dir)
          Set the destination during package installation.
 void setDocumentation(boolean isDoc)
          Set the documentation status.
 void setFilemode(java.lang.String fmode)
          Set the UNIX file permissions.
 void setGroupname(java.lang.String grpname)
          Set the UNIX group name to own the installed files.
 void setSources(java.util.List srclist)
          Set the list of source file specifications.
 void setUsername(java.lang.String uname)
          Set the UNIX user name to own the installed files.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Mapping

public Mapping()
Method Detail

getDirectory

public java.lang.String getDirectory()
Retrieve the destination during package installation.

Returns:
The destination during package installation.

setDirectory

public void setDirectory(java.lang.String dir)
Set the destination during package installation.

Parameters:
dir - The new destination during package installation.

isConfiguration

public boolean isConfiguration()
Retrieve the configuration status. This value is true if the file(s) in this mapping are configuration files.

Returns:
The configuration status.

setConfiguration

public void setConfiguration(boolean isCfg)
Set the configuration status. This value is true if the file(s) in this mapping are configuration files.

Parameters:
isCfg - The new configuration status.

isDocumentation

public boolean isDocumentation()
Retrieve the documentation status. This value is true if the file(s) in this mapping are documentation files.

Returns:
The documentation status.

setDocumentation

public void setDocumentation(boolean isDoc)
Set the documentation status. This value is true if the file(s) in this mapping are documentation files.

Parameters:
isDoc - The new documentation status.

getFilemode

public java.lang.String getFilemode()
Retrieve the UNIX file permissions. This is a three-digit octal number which specifies the permissions to be applied to each file in the mapping when it is installed.

Returns:
The UNIX file permissions.

setFilemode

public void setFilemode(java.lang.String fmode)
Set the UNIX file permissions. This is a three-digit octal number which specifies the permissions to be applied to each file in the mapping when it is installed.

Parameters:
fmode - The new UNIX file permissions.

getUsername

public java.lang.String getUsername()
Retrieve the UNIX user name to own the installed files. Note that this must be a name, not a numeric user ID.

Returns:
The UNIX user name to own the installed files.

setUsername

public void setUsername(java.lang.String uname)
Set the UNIX user name to own the installed files. Note that this must be a name, not a numeric user ID.

Parameters:
uname - The new UNIX user name to own the installed files.

getGroupname

public java.lang.String getGroupname()
Retrieve the UNIX group name to own the installed files. Note that this must be a name, not a numeric group ID.

Returns:
The UNIX group name to own the installed files.

setGroupname

public void setGroupname(java.lang.String grpname)
Set the UNIX group name to own the installed files. Note that this must be a name, not a numeric group ID.

Parameters:
grpname - The new UNIX group name to own the installed files.

getSources

public java.util.List getSources()
Retrieve the list of source file specifications.

Returns:
The list of source file specifications.

setSources

public void setSources(java.util.List srclist)
Set the list of source file specifications.

Parameters:
srclist - The new list of source file specifications.

getArtifact

public ArtifactMap getArtifact()
Retrieve the artifact specification.

Returns:
The artifact specification.

setArtifact

public void setArtifact(ArtifactMap am)
Set the artifact specification.

Parameters:
am - The new artifact specification.

getDependency

public Dependency getDependency()
Retrieve the dependency specification.

Returns:
The dependency specification.

setDependency

public void setDependency(Dependency am)
Set the dependency specification.

Parameters:
am - The new dependency specification.

getAttrString

public java.lang.String getAttrString()
Assemble the RPM SPEC file attributes for a mapping.

Returns:
The attribute string for the SPEC file.

getDestination

public java.lang.String getDestination()
Return the destination directory name.

Returns:
The name of the destination directory.

isDirOnly

public boolean isDirOnly()
Return directory-only status.

Returns:
true if no sources were specified in the mapping

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object


Copyright © 2005-2010. All Rights Reserved.