org.kuali.maven.mojo.s3
Class S3Mojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.kuali.maven.mojo.s3.BaseMojo
          extended by org.kuali.maven.mojo.s3.S3Mojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
UpdateOriginBucketMojo

public abstract class S3Mojo
extends BaseMojo

Abstract mojo containing S3 mojo essentials.


Field Summary
private  String accessKeyId
          Amazon AWS Access Key Id.
private  String bucket
          The name of the bucket to update.
private  String delimiter
          The delimiter used to organize keys into a hierarchy.
private  Integer maxKeys
          Maximum number of keys to return per query.
(package private)  com.amazonaws.services.s3.internal.Mimetypes mimeTypes
          Helper class for determining the mime types of objects.
private  String prefix
          Only update the bucket hierarchy underneath this prefix.
private  String secretAccessKey
          Amazon AWS Secret Access Key.
private  String serverId
          This is the id of the server from settings.xml containing Amazon AWS credentials.
 
Fields inherited from class org.kuali.maven.mojo.s3.BaseMojo
FS, SKIP_PACKAGING_TYPE
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
S3Mojo()
           
 
Method Summary
 String getAccessKeyId()
           
protected  String getAuthenticationErrorMessage()
           
 String getBucket()
           
protected  com.amazonaws.auth.AWSCredentials getCredentials()
           
 String getDelimiter()
           
 Integer getMaxKeys()
           
protected  com.amazonaws.services.s3.model.ObjectMetadata getObjectMetadata(String location, org.springframework.core.io.Resource resource)
           
 String getPrefix()
           
protected  com.amazonaws.services.s3.model.PutObjectRequest getPutObjectRequest(String location)
           
protected  com.amazonaws.services.s3.model.PutObjectRequest getPutObjectRequest(String location, String key)
           
 String getSecretAccessKey()
           
 String getServerId()
           
 void setAccessKeyId(String accessKeyId)
           
 void setBucket(String bucket)
           
 void setDelimiter(String delimiter)
           
 void setMaxKeys(Integer maxKeys)
           
 void setPrefix(String prefix)
           
 void setSecretAccessKey(String secretAccessKey)
           
 void setServerId(String serverId)
           
protected  void updateCredentials()
           
protected  void validateCredentials()
           
 
Methods inherited from class org.kuali.maven.mojo.s3.BaseMojo
execute, executeMojo, getEncoding, getMavenSession, getProject, getSettings, isForceMojoExecution, isSkip, setEncoding, setForceMojoExecution, setMavenSession, setProject, setSettings, setSkip, skipMojo
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mimeTypes

com.amazonaws.services.s3.internal.Mimetypes mimeTypes
Helper class for determining the mime types of objects.


serverId

private String serverId
This is the id of the server from settings.xml containing Amazon AWS credentials.


prefix

private String prefix
Only update the bucket hierarchy underneath this prefix.


delimiter

private String delimiter
The delimiter used to organize keys into a hierarchy.


maxKeys

private Integer maxKeys
Maximum number of keys to return per query.


accessKeyId

private String accessKeyId
Amazon AWS Access Key Id. See also serverId.


secretAccessKey

private String secretAccessKey
Amazon AWS Secret Access Key. See also serverId.


bucket

private String bucket
The name of the bucket to update.

Constructor Detail

S3Mojo

public S3Mojo()
Method Detail

getObjectMetadata

protected com.amazonaws.services.s3.model.ObjectMetadata getObjectMetadata(String location,
                                                                           org.springframework.core.io.Resource resource)
                                                                    throws IOException
Throws:
IOException

getPutObjectRequest

protected com.amazonaws.services.s3.model.PutObjectRequest getPutObjectRequest(String location,
                                                                               String key)
                                                                        throws IOException
Throws:
IOException

getPutObjectRequest

protected com.amazonaws.services.s3.model.PutObjectRequest getPutObjectRequest(String location)
                                                                        throws IOException
Throws:
IOException

getAuthenticationErrorMessage

protected String getAuthenticationErrorMessage()

updateCredentials

protected void updateCredentials()

validateCredentials

protected void validateCredentials()
                            throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

getCredentials

protected com.amazonaws.auth.AWSCredentials getCredentials()
                                                    throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

getAccessKeyId

public String getAccessKeyId()

setAccessKeyId

public void setAccessKeyId(String accessKeyId)

getSecretAccessKey

public String getSecretAccessKey()

setSecretAccessKey

public void setSecretAccessKey(String secretAccessKey)

getBucket

public String getBucket()

setBucket

public void setBucket(String bucket)

getPrefix

public String getPrefix()

setPrefix

public void setPrefix(String prefix)

getDelimiter

public String getDelimiter()

setDelimiter

public void setDelimiter(String delimiter)

getMaxKeys

public Integer getMaxKeys()

setMaxKeys

public void setMaxKeys(Integer maxKeys)

getServerId

public String getServerId()

setServerId

public void setServerId(String serverId)


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.