Codota Logo
RolesACL.<init>
Code IndexAdd Codota to your IDE (free)

How to use
jrds.webapp.RolesACL
constructor

Best Java code snippets using jrds.webapp.RolesACL.<init> (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: fbacchella/jrds

@Override
public ACL join(ACL acl) {
  if(acl instanceof RolesACL) {
    Set<String> newRoles = new HashSet<String>(roles);
    newRoles.addAll(((RolesACL) acl).getRoles());
    return new RolesACL(newRoles);
  } else if(acl instanceof AdminACL) {
    Set<String> newRoles = new HashSet<String>(roles);
    newRoles.add(((AdminACL) acl).getAdminRole());
    return new RolesACL(newRoles);
  } else {
    return this;
  }
}
origin: fbacchella/jrds

/**
 * Add a roles ACL to the object being build, but only if security was set
 * in the properties. If the xpath match no roles, the object will have no
 * ACL set, so it will use it's own default ACL.
 * 
 * @param object The object to add a role to
 * @param n The DOM tree where the xpath will look into
 * @param roleElements the role element
 */
protected void doACL(WithACL object, JrdsDocument n, JrdsElement roleElements) {
  if(pm.security) {
    List<String> roles = new ArrayList<String>();
    for(JrdsElement e: roleElements.getChildElementsByName("role")) {
      roles.add(e.getTextContent());
    }
    if(roles.size() > 0) {
      object.addACL(new RolesACL(new HashSet<String>(roles)));
      object.addACL(pm.adminACL);
    } else {
      object.addACL(pm.defaultACL);
    }
  }
}
origin: fbacchella/jrds

  defaultRoles.add(aRole.trim());
defaultACL = new RolesACL(defaultRoles);
defaultACL = defaultACL.join(adminACL);
jrds.webappRolesACL<init>

Popular methods of RolesACL

  • getRoles

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • compareTo (BigDecimal)
  • startActivity (Activity)
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Notification (javax.management)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now