Refactor Contacts Sample to use new ACL security.

This commit is contained in:
Ben Alex
2004-11-15 03:25:39 +00:00
parent bc9a599bf7
commit 6e687d47d4
39 changed files with 1788 additions and 1044 deletions

View File

@@ -17,10 +17,6 @@ package sample.contact;
/**
* Represents a contact.
*
* <P>
* <code>id</code> and <code>owner</code> are immutable.
* </p>
*
* @author Ben Alex
* @version $Id$
@@ -31,20 +27,15 @@ public class Contact {
private Integer id;
private String email;
private String name;
private String owner;
//~ Constructors ===========================================================
public Contact(Integer id, String name, String email, String owner) {
this.id = id;
public Contact(String name, String email) {
this.name = name;
this.email = email;
this.owner = owner;
}
private Contact() {
super();
}
public Contact() {}
//~ Methods ================================================================
@@ -66,6 +57,10 @@ public class Contact {
return email;
}
public void setId(Integer id) {
this.id = id;
}
/**
* DOCUMENT ME!
*
@@ -93,22 +88,12 @@ public class Contact {
return name;
}
/**
* DOCUMENT ME!
*
* @return Returns the owner.
*/
public String getOwner() {
return owner;
}
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append(super.toString() + ": ");
sb.append("Id: " + this.getId() + "; ");
sb.append("Name: " + this.getName() + "; ");
sb.append("Email: " + this.getEmail() + "; ");
sb.append("Owner: " + this.getOwner());
sb.append("Email: " + this.getEmail());
return sb.toString();
}