本文整理汇总了Java中org.kuali.rice.krad.uif.component.ComponentSecurity类的典型用法代码示例。如果您正苦于以下问题:Java ComponentSecurity类的具体用法?Java ComponentSecurity怎么用?Java ComponentSecurity使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ComponentSecurity类属于org.kuali.rice.krad.uif.component包,在下文中一共展示了ComponentSecurity类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: canEditField
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入依赖的package包/类
/**
* @see ViewAuthorizer#canEditField(org.kuali.rice.krad.uif.view.View, org.kuali.rice.krad.uif.view.ViewModel,
* org.kuali.rice.krad.uif.field.Field, java.lang.String, org.kuali.rice.kim.api.identity.Person)
*/
public boolean canEditField(View view, ViewModel model, Field field, String propertyName, Person user) {
ComponentSecurity componentSecurity = field.getComponentSecurity();
// check component security exists
if (componentSecurity == null) {
return true;
}
// first check hide flag is set (lower precedence)
if (componentSecurity.isEditAuthz() == null && !isDataFieldAttributeSecurityHide(field)) {
return true;
}
// then check edit authz is set (higher precedence)
if (componentSecurity.isEditAuthz() != null && !componentSecurity.isEditAuthz().booleanValue()) {
return true;
}
return isAuthorizedByTemplate(view, field, model, KimConstants.PermissionTemplateNames.EDIT_FIELD, user, null,
null, false);
}
示例2: canViewField
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入依赖的package包/类
/**
* @see ViewAuthorizer#canViewField(org.kuali.rice.krad.uif.view.View, org.kuali.rice.krad.uif.view.ViewModel,
* org.kuali.rice.krad.uif.field.Field, java.lang.String, org.kuali.rice.kim.api.identity.Person)
*/
public boolean canViewField(View view, ViewModel model, Field field, String propertyName, Person user) {
ComponentSecurity componentSecurity = field.getComponentSecurity();
// check component security exists
if (componentSecurity == null) {
return true;
}
// first check hide flag is set (lower precedence)
if (componentSecurity.isViewAuthz() == null && !isDataFieldAttributeSecurityHide(field)) {
return true;
}
// then check view authz is set (higher precedence)
if (componentSecurity.isViewAuthz() != null && !componentSecurity.isViewAuthz().booleanValue()) {
return true;
}
return isAuthorizedByTemplate(view, field, model, KimConstants.PermissionTemplateNames.VIEW_FIELD, user, null,
null, false);
}
示例3: canEditGroup
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入依赖的package包/类
/**
* @see ViewAuthorizer#canEditGroup(org.kuali.rice.krad.uif.view.View, org.kuali.rice.krad.uif.view.ViewModel,
* org.kuali.rice.krad.uif.container.Group, java.lang.String, org.kuali.rice.kim.api.identity.Person)
*/
public boolean canEditGroup(View view, ViewModel model, Group group, String groupId, Person user) {
ComponentSecurity componentSecurity = group.getComponentSecurity();
// check component security exists
if (componentSecurity == null) {
return true;
}
// check edit group authz flag is set
if (componentSecurity.isEditAuthz() == null || !componentSecurity.isEditAuthz().booleanValue()) {
return true;
}
return isAuthorizedByTemplate(view, group, model, KimConstants.PermissionTemplateNames.EDIT_GROUP, user, null,
null, false);
}
示例4: canViewGroup
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入依赖的package包/类
/**
* @see ViewAuthorizer#canViewGroup(org.kuali.rice.krad.uif.view.View, org.kuali.rice.krad.uif.view.ViewModel,
* org.kuali.rice.krad.uif.container.Group, java.lang.String, org.kuali.rice.kim.api.identity.Person)
*/
public boolean canViewGroup(View view, ViewModel model, Group group, String groupId, Person user) {
ComponentSecurity componentSecurity = group.getComponentSecurity();
// check component security exists
if (componentSecurity == null) {
return true;
}
// check view group authz flag is set
if (componentSecurity.isViewAuthz() == null || !componentSecurity.isViewAuthz().booleanValue()) {
return true;
}
return isAuthorizedByTemplate(view, group, model, KimConstants.PermissionTemplateNames.VIEW_GROUP, user, null,
null, false);
}
示例5: canEditWidget
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入依赖的package包/类
/**
* @see ViewAuthorizer#canEditWidget(org.kuali.rice.krad.uif.view.View, org.kuali.rice.krad.uif.view.ViewModel,
* org.kuali.rice.krad.uif.widget.Widget, java.lang.String, org.kuali.rice.kim.api.identity.Person)
*/
public boolean canEditWidget(View view, ViewModel model, Widget widget, String widgetId, Person user) {
ComponentSecurity componentSecurity = widget.getComponentSecurity();
// check component security exists
if (componentSecurity == null) {
return true;
}
// check edit widget authz flag is set
if (componentSecurity.isEditAuthz() == null || !componentSecurity.isEditAuthz().booleanValue()) {
return true;
}
return isAuthorizedByTemplate(view, widget, model, KimConstants.PermissionTemplateNames.EDIT_WIDGET, user, null,
null, false);
}
示例6: canViewWidget
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入依赖的package包/类
/**
* @see ViewAuthorizer#canViewWidget(org.kuali.rice.krad.uif.view.View, org.kuali.rice.krad.uif.view.ViewModel,
* org.kuali.rice.krad.uif.widget.Widget, java.lang.String, org.kuali.rice.kim.api.identity.Person)
*/
public boolean canViewWidget(View view, ViewModel model, Widget widget, String widgetId, Person user) {
ComponentSecurity componentSecurity = widget.getComponentSecurity();
// check component security exists
if (componentSecurity == null) {
return true;
}
// check view widget authz flag is set
if (componentSecurity.isViewAuthz() == null || !componentSecurity.isViewAuthz().booleanValue()) {
return true;
}
return isAuthorizedByTemplate(view, widget, model, KimConstants.PermissionTemplateNames.VIEW_WIDGET, user, null,
null, false);
}
示例7: setComponentSecurity
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入依赖的package包/类
/**
* Override to assert a {@link ActionSecurity} instance is set.
*
* @param componentSecurity instance of ActionSecurity
*/
@Override
public void setComponentSecurity(ComponentSecurity componentSecurity) {
if ((componentSecurity != null) && !(componentSecurity instanceof ActionSecurity)) {
throw new RiceRuntimeException("Component security for Action should be instance of ActionSecurity");
}
super.setComponentSecurity(componentSecurity);
}
示例8: setComponentSecurity
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void setComponentSecurity(ComponentSecurity componentSecurity) {
if ((componentSecurity != null) && !(componentSecurity instanceof DataFieldSecurity)) {
throw new RiceRuntimeException("Component security for DataField should be instance of DataFieldSecurity");
}
super.setComponentSecurity(componentSecurity);
}
示例9: setComponentSecurity
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入依赖的package包/类
/**
* Override to assert a {@link FieldSecurity} instance is set
*
* @param componentSecurity instance of FieldSecurity
*/
@Override
public void setComponentSecurity(ComponentSecurity componentSecurity) {
if ((componentSecurity != null) && !(componentSecurity instanceof FieldSecurity)) {
throw new RiceRuntimeException("Component security for Field should be instance of FieldSecurity");
}
super.setComponentSecurity(componentSecurity);
}
示例10: setComponentSecurity
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void setComponentSecurity(ComponentSecurity componentSecurity) {
if ((componentSecurity != null) && !(componentSecurity instanceof CollectionGroupSecurity)) {
throw new RiceRuntimeException(
"Component security for CollectionGroup should be instance of CollectionGroupSecurity");
}
super.setComponentSecurity(componentSecurity);
}
示例11: setComponentSecurity
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入依赖的package包/类
/**
* Override to assert a {@link ActionSecurity} instance is set
*
* @param componentSecurity instance of ActionSecurity
*/
@Override
public void setComponentSecurity(ComponentSecurity componentSecurity) {
if (!(componentSecurity instanceof ActionSecurity)) {
throw new RiceRuntimeException("Component security for Action should be instance of ActionSecurity");
}
super.setComponentSecurity(componentSecurity);
}
示例12: setComponentSecurity
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入依赖的package包/类
/**
* Override to assert a {@link DataFieldSecurity} instance is set
*
* @param componentSecurity instance of DataFieldSecurity
*/
@Override
public void setComponentSecurity(ComponentSecurity componentSecurity) {
if (!(componentSecurity instanceof DataFieldSecurity)) {
throw new RiceRuntimeException("Component security for DataField should be instance of DataFieldSecurity");
}
super.setComponentSecurity(componentSecurity);
}
示例13: setComponentSecurity
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入依赖的package包/类
/**
* Override to assert a {@link FieldSecurity} instance is set
*
* @param componentSecurity instance of FieldSecurity
*/
@Override
public void setComponentSecurity(ComponentSecurity componentSecurity) {
if (!(componentSecurity instanceof FieldSecurity)) {
throw new RiceRuntimeException("Component security for Field should be instance of FieldSecurity");
}
super.setComponentSecurity(componentSecurity);
}
示例14: setComponentSecurity
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入依赖的package包/类
/**
* Override to assert a {@link CollectionGroupSecurity} instance is set
*
* @param componentSecurity instance of CollectionGroupSecurity
*/
@Override
public void setComponentSecurity(ComponentSecurity componentSecurity) {
if (!(componentSecurity instanceof CollectionGroupSecurity)) {
throw new RiceRuntimeException(
"Component security for CollectionGroup should be instance of CollectionGroupSecurity");
}
super.setComponentSecurity(componentSecurity);
}
示例15: performLifecycleTask
import org.kuali.rice.krad.uif.component.ComponentSecurity; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void performLifecycleTask() {
ExpressionEvaluator expressionEvaluator = ViewLifecycle.getExpressionEvaluator();
View view = ViewLifecycle.getView();
Component component = (Component) getElementState().getElement();
List<PropertyReplacer> componentPropertyReplacers = component.getPropertyReplacers();
if (componentPropertyReplacers != null) {
for (PropertyReplacer replacer : componentPropertyReplacers) {
expressionEvaluator.evaluateExpressionsOnConfigurable(view, replacer, component.getContext());
}
}
List<ComponentModifier> componentModifiers = component.getComponentModifiers();
if (componentModifiers != null) {
for (ComponentModifier modifier : componentModifiers) {
expressionEvaluator.evaluateExpressionsOnConfigurable(view, modifier, component.getContext());
}
}
expressionEvaluator.evaluateExpressionsOnConfigurable(view, component, component.getContext());
// evaluate expressions on component security
ComponentSecurity componentSecurity = component.getComponentSecurity();
expressionEvaluator.evaluateExpressionsOnConfigurable(view, componentSecurity, component.getContext());
// evaluate expressions on the binding info object
if (component instanceof DataBinding) {
BindingInfo bindingInfo = ((DataBinding) component).getBindingInfo();
expressionEvaluator.evaluateExpressionsOnConfigurable(view, bindingInfo, component.getContext());
}
// set context evaluate expressions on the layout manager
if (component instanceof Container) {
LayoutManager layoutManager = ((Container) component).getLayoutManager();
if (layoutManager != null) {
expressionEvaluator.evaluateExpressionsOnConfigurable(view, layoutManager,
layoutManager.getContext());
adjustIdIfNecessary(layoutManager);
}
}
}