org.kohsuke.jnt.tools
Class RoleRequest

java.lang.Object
  extended by org.kohsuke.jnt.tools.RoleRequest

public class RoleRequest
extends Object

A notification message sent from java.net when someone requests a role.

Author:
Kohsuke Kawaguchi (kk@kohsuke.org)

Field Summary
 String projectName
          Project to which the role is requested.
 String roleName
          The role that was requested.
 String userName
          The account name of the user who requested the role.
 
Constructor Summary
RoleRequest(Reader message)
          Parses the notification e-mail and constructs this object.
RoleRequest(String _projectName, String _userName, String _roleName)
          Creates a new request.
 
Method Summary
 void decline(JavaNet javanet, String reason)
          Declines this request.
 void grant(JavaNet javanet)
          Grants this request.
static void main(String[] args)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

projectName

public final String projectName
Project to which the role is requested.


userName

public final String userName
The account name of the user who requested the role.


roleName

public final String roleName
The role that was requested.

Constructor Detail

RoleRequest

public RoleRequest(String _projectName,
                   String _userName,
                   String _roleName)
Creates a new request.


RoleRequest

public RoleRequest(Reader message)
            throws IOException,
                   ParseException
Parses the notification e-mail and constructs this object.

Parameters:
message - The Reader that reads an e-mail. This could be just the content of an e-mail, or the whole message including MIME headers.
Throws:
ParseException - if the text isn't a role request e-mail.
IOException
Method Detail

grant

public void grant(JavaNet javanet)
           throws ProcessingException
Grants this request.

Throws:
ProcessingException

decline

public void decline(JavaNet javanet,
                    String reason)
             throws ProcessingException
Declines this request.

Throws:
ProcessingException

toString

public String toString()
Overrides:
toString in class Object

main

public static void main(String[] args)
                 throws IOException,
                        ParseException
Throws:
IOException
ParseException


Copyright © 2003-2009 Kohsuke Kawaguchi. All Rights Reserved.