Package org.beangle.ems.security.restrict.model

Examples of org.beangle.ems.security.restrict.model.RestrictFieldBean


  CsvDataResolver resolver = new CsvDataResolver();
  RestrictField field = null;

  @BeforeClass
  public void setUp() {
    field = new RestrictFieldBean("group", GroupBean.class.getName(), "oql:from Group");
    field.setKeyName("id");
    field.setPropertyNames("name");
  }
View Full Code Here


    restrictionService.setDataResolver(resolver);
    restrictionService.getProviders().put(resolver.getName(), resolver);
  }

  public void testApply() {
    RestrictField field = new RestrictFieldBean("groups", GroupBean.class.getName(),
        "id;name,1;group1,2;group2");
    field.setKeyName("id");
    field.setPropertyNames("name");
    RestrictEntity entity = new RestrictEntityBean("user", User.class);
    entity.getFields().add(field);
    RestrictPattern pattern = new RestrictPatternBean(entity,
        "exists(from {alias}.groups as g where g.group in(:groups))");
    Restriction restriction = new UserRestrictionBean(null, pattern);
View Full Code Here

TOP

Related Classes of org.beangle.ems.security.restrict.model.RestrictFieldBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.