All Packages Class Hierarchy This Package Previous Next Index
Class icc.db.Partner
java.lang.Object
|
+----icc.db.Entity
|
+----icc.db.Partner
- public class Partner
- extends Entity
The Partner class represents a person or project partner.
A partner is minimally defined by a unique identifier and a unique username.
Other attributes may be specified as well, preferably a first and last name.
All changes to a Partner object must be submitted to the project
database before these will take effect. Note that only the partner
self, or the administrator of a project this person is a partner of,
can submit such changes successfully.
-
ENTRY
- The name of a service that updates partner information in the database
on request.
-
FIRSTNAME
- A useful constant for specifying or retrieving the partner's first name.
-
LASTNAME
- A useful constant for specifying or retrieving the partner's last name.
-
QUERY
- The name of a service that retrieves partner information from the
database on request.
-
reset
- A request to reset all partner information stored at the webtop level.
-
Partner(Integer, String)
-
-
Partner(String)
- Allocates a Partner object with the specified username.
-
addProject(Integer)
- Creates a data request to add this partner to the specified project.
-
addProject(Integer, String)
- Creates a data request to add this partner to the specified project.
-
alter()
- Creates a data request to modify this partner information.
-
attribute(String)
- Returns the partner's attribute value with respect to the specified key.
-
attributes()
- Returns an enumeration of the attributes.
-
clean()
- Clears all information in this partner.
-
clear()
- Removes all Partner objects previously put.
-
clearAttributes()
- Removes all attributes.
-
contains(Integer)
- Tests if a partner with the specified identifier has previously been
put.
-
copy(Partner)
- Copies the specified partner information into this partner.
-
create(Integer, String, String, Integer)
- Creates a data request to create a new partner with the specified
password and add this partner to the specified project (with function),
as a member of the specified team.
-
description()
- Returns the partner's full name (first and last).
-
find(String)
- Creates a data request to find the partner identifier corresponding
the specified username in the project database.
-
get(Integer)
- Retrieves the Partner object for the specified identifier,
if previously put.
-
get(String)
- Retrieves a partner by username, if previously put.
-
hasAttributes()
- Returns the number of attributes defined for this partner.
-
id(String)
- Retrieves the partner identifier corresponding the specified username,
if previously put.
-
put()
- Stores this object for later retrieval by username or identifier.
-
remove()
- Removes this object from local storage, if previously put.
-
remove(Integer)
- Removes the Partner object with the specified identifier
previously put, if any.
-
removeAttribute(String)
- Removes an attribute.
-
removeProject(Integer)
- Creates a data request to remove this partner from the specified
project.
-
retrieve(Integer)
- Creates a data request to retrieve the partner information for
the specified identifier.
-
retrieve(Integer[])
- Creates a data request to retrieve an array of partner informations for
the specified identifiers.
-
retrieve(String)
- Creates a data request to retrieve the partner information for
the specified username.
-
retrieve(String, String)
- Creates a data request to retrieve an array of partner informations
corresponding the specified attribute information.
-
setAttribute(String, String)
- Sets an attribute.
-
setUsername(String)
- Sets this partner's username.
-
username()
- Returns the partner's username.
FIRSTNAME
public static final String FIRSTNAME
- A useful constant for specifying or retrieving the partner's first name.
LASTNAME
public static final String LASTNAME
- A useful constant for specifying or retrieving the partner's last name.
QUERY
public static final String QUERY
- The name of a service that retrieves partner information from the
database on request.
ENTRY
public static final String ENTRY
- The name of a service that updates partner information in the database
on request. This service only accepts requests submitted by the partner
self, or the administrator of a project this person is a partner of.
reset
public static final Request reset
- A request to reset all partner information stored at the webtop level.
Though this information should always be identical to the information
in the project database, upon certain administrative actions this may
no longer be the case. A request to reset this information should
only be submitted by the project administrator.
Partner
Partner(Integer id,
String username)
Partner
public Partner(String username)
- Allocates a Partner object with the specified username.
The partner identifier is set to NEW.
- Parameters:
- username - the partner's unique username
- See Also:
- NEW
username
public final String username()
- Returns the partner's username.
- Returns:
- the username
description
public String description()
- Returns the partner's full name (first and last).
- Returns:
- the full name
- Overrides:
- description in class Entity
attribute
public final String attribute(String key)
- Returns the partner's attribute value with respect to the specified key.
- Parameters:
- key - the attribute key
- Returns:
- the attribute value
hasAttributes
public final int hasAttributes()
- Returns the number of attributes defined for this partner.
- Returns:
- the number of attributes
attributes
public final Enumeration attributes()
- Returns an enumeration of the attributes. Use the Enumeration
methods on the returned object to fetch the elements sequentially.
- Returns:
- an enumeration of the attributes
setUsername
public final void setUsername(String name)
- Sets this partner's username. This can only be done as long as the
partner information has not been stored in the project database, i.e.,
if the partner's identifier is equal to NEW.
- Parameters:
- name - the new partner's username
- See Also:
- NEW, create
setAttribute
public final void setAttribute(String key,
String value)
- Sets an attribute. Any previous setting is lost.
Altering the partner's attributes has no actual effect until these
attributes are also updated in the database.
- Parameters:
- key - the attribute key
- value - the attribute value
- See Also:
- alter
removeAttribute
public final void removeAttribute(String key)
- Removes an attribute.
Altering the partner's attributes has no actual effect until these
attributes are also updated in the database.
- Parameters:
- key - the attribute key
- See Also:
- alter
clearAttributes
public final void clearAttributes()
- Removes all attributes.
Altering the partner's attributes has no actual effect until these
attributes are also updated in the database.
- See Also:
- alter
copy
public void copy(Partner from)
- Copies the specified partner information into this partner.
This partner cannot be trusted.
- Parameters:
- from - the partner information to be copied
clean
public void clean()
- Clears all information in this partner. This partner cannot be trusted.
contains
public static final boolean contains(Integer id)
- Tests if a partner with the specified identifier has previously been
put.
- Parameters:
- id - a partner identifier
- Returns:
- true if this partner has previously been
put; false otherwise
get
public static final Partner get(Integer id)
- Retrieves the Partner object for the specified identifier,
if previously put.
- Parameters:
- id - a partner identifier
- Returns:
- the partner corresponding this identifier, if known;
otherwise null
get
public static final Partner get(String name)
- Retrieves a partner by username, if previously put.
- Parameters:
- name - a partner's username
- Returns:
- the partner corresponding this username, if known;
otherwise null
id
public static final Integer id(String name)
- Retrieves the partner identifier corresponding the specified username,
if previously put.
- Parameters:
- name - a partner's username
- Returns:
- the partner identifier, if known; otherwise null
put
public final void put()
- Stores this object for later retrieval by username or identifier.
Only trusted objects can be stored.
remove
public final void remove()
- Removes this object from local storage, if previously put.
remove
public static final Partner remove(Integer id)
- Removes the Partner object with the specified identifier
previously put, if any.
- Parameters:
- id - a partner identifier
- Returns:
- the object in question, if any; otherwise null
clear
public static final void clear()
- Removes all Partner objects previously put.
find
public static DataRequest find(String name)
- Creates a data request to find the partner identifier corresponding
the specified username in the project database.
- Parameters:
- name - a username
- Returns:
- a data request to find a partner identifier
- See Also:
- SERVICE
retrieve
public static DataRequest retrieve(String name)
- Creates a data request to retrieve the partner information for
the specified username.
- Parameters:
- name - a username
- Returns:
- a data request to retrieve partner information
- See Also:
- SERVICE
retrieve
public static DataRequest retrieve(Integer id)
- Creates a data request to retrieve the partner information for
the specified identifier.
- Parameters:
- id - a partner identifier
- Returns:
- a data request to retrieve partner information
- See Also:
- SERVICE
retrieve
public static DataRequest retrieve(Integer ids[])
- Creates a data request to retrieve an array of partner informations for
the specified identifiers.
- Parameters:
- ids - an array of partner identifiers
- Returns:
- a data request to retrieve an array of partner informations
- See Also:
- SERVICE
retrieve
public static DataRequest retrieve(String type,
String value)
- Creates a data request to retrieve an array of partner informations
corresponding the specified attribute information.
- Parameters:
- type - the attribute type
- value - the attribute value
- Returns:
- a data request to retrieve an array of partner informations
- See Also:
- SERVICE
create
public DataRequest create(Integer project,
String password,
String function,
Integer team)
- Creates a data request to create a new partner with the specified
password and add this partner to the specified project (with function),
as a member of the specified team.
Only the project administrator can submit this request.
If successful, appropriate events are posted.
- Parameters:
- project - a project identifier
- password - an initial password
- function - a project function
- team - a team identifier
- Returns:
- a data request to create a new project partner
- See Also:
- SERVICE, PartnerEvents, ProjectEvents
alter
public DataRequest alter()
- Creates a data request to modify this partner information.
Only the partner self, or the administrator of a project the person
is a partner of, can submit this request.
If successful, an appropriate event is posted.
- Returns:
- a data request to modify partner information
- See Also:
- SERVICE, PartnerEvents
addProject
public DataRequest addProject(Integer project)
- Creates a data request to add this partner to the specified project.
Only the project administrator can submit this request.
If successful, an appropriate event is posted.
- Parameters:
- project - a project identifier
- Returns:
- a data request to add a partner to a project
- See Also:
- SERVICE, ProjectEvents
addProject
public DataRequest addProject(Integer project,
String function)
- Creates a data request to add this partner to the specified project.
Only the project administrator can submit this request.
If successful, an appropriate event is posted.
- Parameters:
- project - a project identifier
- function - the partner's function
- Returns:
- a data request to add a partner to a project
- See Also:
- SERVICE, ProjectEvents
removeProject
public DataRequest removeProject(Integer project)
- Creates a data request to remove this partner from the specified
project. Only the project administrator can submit this request.
If successful, an appropriate event is posted.
- Parameters:
- project - a project identifier
- Returns:
- a data request to remove a partner from a project
- See Also:
- removePartner, SERVICE, ProjectEvents
All Packages Class Hierarchy This Package Previous Next Index
This website has been archived and is no longer maintained.