org.sakaiproject.component.legacy.alias
Interface BaseAliasService.Storage

All Known Implementing Classes:
DbAliasService.DbStorage, DbAliasService.DbStorageOld
Enclosing interface:
BaseAliasService

protected static interface BaseAliasService.Storage

Storage


Method Summary
 void cancel(AliasEdit alias)
          Cancel the changes and release the lock.
 boolean check(String id)
          Check if an alias with this id exists.
 void close()
          Close.
 void commit(AliasEdit alias)
          Commit the changes and release the lock.
 int count()
          Count all the aliases.
 int countSearch(String criteria)
          Count all the aliases with id or target matching criteria.
 AliasEdit edit(String id)
          Get a lock on the alias with this id, or null if a lock cannot be gotten.
 AliasEdit get(String id)
          Get the alias with this id, or null if not found.
 List getAll()
          Get all the alias.
 List getAll(int first, int last)
          Get all the alias in record range.
 List getAll(String target)
          Get all the alias that point at this target.
 List getAll(String target, int first, int last)
          Get all the alias that point at this target, in record range.
 void open()
          Open.
 AliasEdit put(String id)
          Add a new alias with this id.
 void readProperties(AliasEdit edit, ResourcePropertiesEdit props)
          Read properties from storage into the edit's properties.
 void remove(AliasEdit alias)
          Remove this alias.
 List search(String criteria, int first, int last)
          Search for aliases with id or target matching criteria, in range.
 

Method Detail

open

public void open()
Open.


close

public void close()
Close.


check

public boolean check(String id)
Check if an alias with this id exists.

Parameters:
id - The alias id (case insensitive).
Returns:
true if an alias by this id exists, false if not.

get

public AliasEdit get(String id)
Get the alias with this id, or null if not found.

Parameters:
id - The alias id (case insensitive).
Returns:
The alias with this id, or null if not found.

getAll

public List getAll()
Get all the alias.

Returns:
The List (BaseAliasEdit) of all alias.

getAll

public List getAll(int first,
                   int last)
Get all the alias in record range.

Parameters:
first - The first record position to return.
last - The last record position to return.
Returns:
The List (BaseAliasEdit) of all alias.

count

public int count()
Count all the aliases.

Returns:
The count of all aliases.

search

public List search(String criteria,
                   int first,
                   int last)
Search for aliases with id or target matching criteria, in range.

Parameters:
criteria - The search criteria.
first - The first record position to return.
last - The last record position to return.
Returns:
The List (BaseAliasEdit) of all alias.

countSearch

public int countSearch(String criteria)
Count all the aliases with id or target matching criteria.

Parameters:
criteria - The search criteria.
Returns:
The count of all aliases with id or target matching criteria.

getAll

public List getAll(String target)
Get all the alias that point at this target.

Returns:
The List (BaseAliasEdit) of all alias that point at this target

getAll

public List getAll(String target,
                   int first,
                   int last)
Get all the alias that point at this target, in record range.

Parameters:
first - The first record position to return.
last - The last record position to return.
Returns:
The List (BaseAliasEdit) of all alias that point at this target, in record range.

put

public AliasEdit put(String id)
Add a new alias with this id.

Parameters:
id - The alias id.
Returns:
The locked Alias object with this id, or null if the id is in use.

edit

public AliasEdit edit(String id)
Get a lock on the alias with this id, or null if a lock cannot be gotten.

Parameters:
id - The alias id (case insensitive).
Returns:
The locked Alias with this id, or null if this records cannot be locked.

commit

public void commit(AliasEdit alias)
Commit the changes and release the lock.


cancel

public void cancel(AliasEdit alias)
Cancel the changes and release the lock.


remove

public void remove(AliasEdit alias)
Remove this alias.


readProperties

public void readProperties(AliasEdit edit,
                           ResourcePropertiesEdit props)
Read properties from storage into the edit's properties.

Parameters:
edit - The user to read properties for.