// print the roles of the current user for ( String role : ADFContext.getCurrent().getSecurityContext().getUserRoles() ) { System.out.println("role "+role); } // get the ADF security context and test if the user has the role users SecurityContext sec = ADFContext.getCurrent().getSecurityContext(); if ( sec.isUserInRole("users") ) { } // is the user valid public boolean isAuthenticated() { return ADFContext.getCurrent().getSecurityContext().isAuthenticated(); } // return the user public String getCurrentUser() { return ADFContext.getCurrent().getSecurityContext().getUserName(); } // get the binding container BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry(); // get an ADF attributevalue from the ADF page definitions AttributeBinding attr = (AttributeBinding)bindings.getControlBinding("test"); attr.setInputValue("test"); ...
Advanced ADF and Webcenter Learning