UsecaseMessage[] messages;
ServiceSelector selector = null;
AccessControllerResolver acResolver = null;
AccessController accessController = null;
UsecaseResolver usecaseResolver = null;
UsecaseAuthorizer authorizer = null;
String usecaseName = tab.getUsecase();
if (usecaseName == null) {
throw new IllegalArgumentException("The usecase name of the tab [" + tab.getName() + "] is null.");
}
try {
selector = (ServiceSelector) this.manager.lookup(AccessControllerResolver.ROLE
+ "Selector");
acResolver = (AccessControllerResolver) selector.select(AccessControllerResolver.DEFAULT_RESOLVER);
accessController = acResolver.resolveAccessController(this.webappUrl);
Authorizer[] authorizers = accessController.getAuthorizers();
for (int i = 0; i < authorizers.length; i++) {
if (authorizers[i] instanceof UsecaseAuthorizer) {
authorizer = (UsecaseAuthorizer) authorizers[i];
}
}