January 8, 2010

AzMan API Library II

To continue my post on the AzMan Library, I wanted to show all the basic classes and makeup and since I briefly discussed it yesterday, I figure it is worth showing:
//AzLibApplication
IAzApplication _app;

public AzLibApplication(object app)
{
_app = (IAzApplication)app;
}

public IAzApplication Native
{
get { return _app; }
}

public string Name
{
get { return _app.Name; }
}

public string Description
{
get { return _app.Description; }
}

public List<AzLibOperation> Operations
{
get { return AzLibAzManHelper.GetOps((IAzOperations)_app.Operations); }
}

public List<AzLibRole> Roles
{
get {
return AzLibAzManHelper.GetRoles(
this,
(IAzRoles)_app.Roles,
(IAzTasks)_app.Tasks
);
}
}

public List<AzLibTask> Tasks
{
get { return AzLibAzManHelper.GetTasks((IAzTasks)_app.Tasks); }
}

public List<AzLibScope> Scopes
{
get { return AzLibAzManHelper.GetScopes(this, (IAzScopes)_app.Scopes); }
}

public List<AzLibApplicationGroup> ApplicationGroups
{
get { return AzLibAzManHelper.GetApplicationGroups((IAzApplicationGroups)_app.ApplicationGroups); }
}

I mentioned yesterday the simple objects...some examples below:

public class AzLibOperation
{
IAzOperation _op;

public AzLibOperation(object op)
{
_op = (IAzOperation)op;
}

public string Name
{
get { return _op.Name; }
}

public string Description
{
get { return _op.Description; }
}

public int OperationID
{
get { return _op.OperationID; }
}
}
Store:
 IAzAuthorizationStore _store;

public AzLibStore(IAzAuthorizationStore store)
{
_store = store;
}

public List<AzLibApplication> Applications
{
get { return AzLibAzManHelper.GetApplications((IAzApplications)_store.Applications); }
}

The API Library as I mentioned is broken out into two assemblies and the first one is what I have been explaining yesterday and today. This weekend I'll explain the second part and post the code for the two assemblies. Next week, I'll get onto secondary applictions built off this API such as the AzMan reporter.

2 comments:

  1. I really could use a link to the Azman Reporter tool you have built...I have a system going live this week that it would be helpful to generate a report of all the group and role memberships for auditing purposes.

    ReplyDelete
  2. Has the "AzMan API Library II" code ever been posted?

    ReplyDelete