Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.codehaus.mojo.rpm;
  
  /*
   * 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.
  */
 
 import java.io.File;
 import java.util.List;

A description of a location where files to be packaged can be found.

Version:
$Id: Source.java 5261 2007-10-07 14:03:39Z boba $
 
 public class Source
 {
     
     // // //  Properties
     
    
The source location.
 
     private File location;
    
    
The list of inclusions.
 
     private List includes;
    
    
The list of exclusions.
 
     private List excludes;
    
    
true to omit the default exclusions.
 
     private boolean noDefaultExcludes;
     
     // // //  Bean methods
     
    
Retrieve the location holding the file(s) to install.

Returns:
The location holding the file(s) to install.
 
     public File getLocation()
     {
         return ;
     }
    
    
Set the location holding the file(s) to install.

Parameters:
loc The new location holding the file(s) to install.
 
     public void setLocationFile loc )
     {
          = loc;
     }
    
    
Retrieve the list of files to include in the package.

Returns:
The list of files to include in the package.
 
     public List getIncludes()
     {
         return ;
     }
    
    
Set the list of files to include in the package.

Parameters:
incl The new list of files to include in the package.
 
     public void setIncludesList incl )
     {
          = incl;
     }
    
    
Retrieve the list of files to exclude from the package.

Returns:
The list of files to exclude from the package.
 
     public List getExcludes()
     {
         return ;
     }
    
    
Set the list of files to exclude from the package.

Parameters:
excl The new list of files to exclude from the package.
 
     public void setExcludesList excl )
     {
          = excl;
    }
    
    
Retrieve the default exclude status.

Returns:
true if the default excludes should be omitted.
    public boolean getNoDefaultExcludes()
    {
        return ;
    }
    
    
Set the default exclude status.

Parameters:
noDefExcl true if the default excludes should be omitted.
    public void setNoDefaultExcludesboolean noDefExcl )
    {
         = noDefExcl;
    }
    
    // // //  Public methods
    
    
    public String toString()
    {
        StringBuffer sb = new StringBuffer();
        sb.append"{" );
        
        if (  == null )
        {
            sb.append"nowhere" );
        }
        else
        {
            sb.append"\"" +  + "\"" );
        }
        
        if (  != null )
        {
            sb.append" incl:" +  );
        }
        
        if (  != null )
        {
            sb.append" excl:" +  );
        }
        
        if (  )
        {
            sb.append" [no default excludes]" );
        }
        
        sb.append"}" );
        return sb.toString();
    }
New to GrepCode? Check out our FAQ X