Peter Donald wrote:
>
> At 11:47 20/3/01 +0100, Ricardo Rocha wrote:
> >Ok, to me this sounds like we've validated the RoleInfo interface...
>
> How about
>
> public interface RoleManager
> {
> String lookup( String hint );
> String[] getHints();
> }
>
> public interface CocoonRoleManager
> extends RoleManager
> {
> String getRoleImplementation( String role );
> }
This doesn't seem clear to me what the lookup() and getHints()
methods do and what a RoleImplementation is. I think that the
RoleManager should be modeled after the RoleUtils class in
Cocoon.
Basically, we need a method of transforming a shorthand name
to a role name, and transforming a role name into the default
implementation. Getting a list of all available roles isn't
really needed.
public interface RoleManager
{
/**
* Gets the Role for the shorthand name.
*/
String getRoleForName(String name);
/**
* Get default implementation class for role
*/
String getDefaultClassNameForRole(String role);
}
These aren't terse, but are eminently clear as to their
function. In that sense, they are self documenting.
The scope of the RoleManager is very narrow. It only exists
as a helper to the ComponentManager.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]