Package juzu.impl.metamodel

Examples of juzu.impl.metamodel.AnnotationKey


        if (annotations != null) {
          JSON controllerJSON = new JSON();
          config.set(controller.getHandle().getName().toString(), controllerJSON);

          for (Map.Entry<AnnotationKey, AnnotationState> entry : annotations.entrySet()) {
            AnnotationKey key = entry.getKey();

            if (controllerJSON.get("require") != null) {
              throw new UnsupportedOperationException("Unsupported multiple requirements at " + key.getElement());
            }

            if (key.getType().equals(Name.create(RequiresGuest.class))) {
              controllerJSON.set("require", "guest");
            } else if (key.getType().equals(Name.create(RequiresAuthentication.class))) {
              controllerJSON.set("require", "authenticate");
            } else if (key.getType().equals(Name.create(RequiresUser.class))) {
              controllerJSON.set("require", "user");
            }
          }
        }
View Full Code Here

TOP

Related Classes of juzu.impl.metamodel.AnnotationKey

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.