{
String identificationTag = generalComposite.getIdentificationTag();
int precedence = generalComposite.getPrecedence();
AuthenticationLevel authenticationLevel = generalComposite.getAuthenticationLevel();
ACIItem aciItem = null;
if ( generalComposite.isUserFirst() )
{
Collection userClasses = userFirstUserClassesComposite.getUserClasses();
Collection userPermissions = userFirstUserPermissionsComposite.getUserPermissions();
aciItem = new UserFirstACIItem( identificationTag, precedence, authenticationLevel, userClasses,
userPermissions );
}
else if ( generalComposite.isItemFirst() )
{
Collection protectedItems = itemFirstProtectedItemsComposite.getProtectedItems();
Collection itemPermissions = itemFirstItemPermissionsComposite.getItemPermissions();
aciItem = new ItemFirstACIItem( identificationTag, precedence, authenticationLevel, protectedItems,
itemPermissions );
}
else
{
aciItem = null;
}
StringBuffer buffer = new StringBuffer();
if ( aciItem != null )
{
aciItem.printToBuffer( buffer );
}
return buffer.toString();
}