Package com.google.caja.config

Examples of com.google.caja.config.WhiteList$TypeDefinition


  private static Pair<CssSchema, List<Message>> defaultSchema;
  public static CssSchema getDefaultCss21Schema(MessageQueue mq) {
    if (defaultSchema == null) {
      SimpleMessageQueue cacheMq = new SimpleMessageQueue();
      WhiteList propDefs, fnDefs;
      try {
        propDefs = ConfigUtil.loadWhiteListFromJson(
            defaultPropWhitelistURL, ConfigUtil.RESOURCE_RESOLVER, cacheMq);
        fnDefs = ConfigUtil.loadWhiteListFromJson(
            defaultFnWhitelistURL, ConfigUtil.RESOURCE_RESOLVER, cacheMq);
View Full Code Here


              Namespaces.HTML_NAMESPACE_URI, BODY_CLASS.localName);
          if (classAttr != null) {
            el.removeAttributeNode(classAttr);
            String identifiers = classAttr.getValue().trim();
            if (!"".equals(identifiers)) {
              WhiteList wl = WhiteList.Factory.empty();
              HtmlAttributeRewriter rw = new HtmlAttributeRewriter(
                  jobs.getPluginMeta(), new CssSchema(wl, wl),
                  htmlSchema, Maps.<Attr, EmbeddedContent>newHashMap(),
                  jobs.getMessageQueue());
              HtmlAttributeRewriter.SanitizedAttr sanitized
View Full Code Here

      mq.addMessage(MessageType.IO_ERROR, src);
    } catch (ParseException ex) {
      ex.toMessageQueue(mq);
    }
    // Return a Null instance if unable to load.
    return new WhiteList() {
        public Set<String> allowedItems() {
          return Collections.<String>emptySet();
        }
        public Map<String, TypeDefinition> typeDefinitions() {
          return Collections.<String, TypeDefinition>emptyMap();
View Full Code Here

      SimpleMessageQueue cacheMq = new SimpleMessageQueue();
      URI fnSrc = URI.create(
              "resource:///com/google/caja/lang/css/css-extensions-fns.json"),
          propSrc = URI.create(
              "resource:///com/google/caja/lang/css/css-extensions.json");
      WhiteList propDefs, fnDefs;
      try {
        propDefs = ConfigUtil.loadWhiteListFromJson(
            propSrc, ConfigUtil.RESOURCE_RESOLVER, cacheMq);
        fnDefs = ConfigUtil.loadWhiteListFromJson(
            fnSrc, ConfigUtil.RESOURCE_RESOLVER, cacheMq);
View Full Code Here

            QName name = elementDeclaration.getName();
            System.out
                    .println("ElementDeclaration[" + j + "] : name = " + name);
        }

        TypeDefinition typeDefinitions[] = descComp.getTypeDefinitions();
        System.out.println("There are " + typeDefinitions.length
                + " TypeDefinition components.");

        for (int j = 0; j < typeDefinitions.length; j++) {
            TypeDefinition typeDefinition = typeDefinitions[j];

            QName name = typeDefinition.getName();
            System.out.println("TypeDefinition[" + j + "] : name = " + name);
        }

        Interface interfaces[] = descComp.getInterfaces();
        System.out.println("There are " + interfaces.length
View Full Code Here

     * TODO consider using Map instead of List
     */
    public TypeDefinition getTypeDefinition(QName qname)
    {
        if(!fComponentsInitialized) initComponents();
        TypeDefinition typeDef = null;
        if(qname != null)
        {
            Iterator i = fAllTypeDefinitions.iterator();
            while(i.hasNext())
            {
                TypeDefinition td = (TypeDefinition)i.next();
                if(qname.equals(td.getName()))
                {
                    typeDef = td;
                    break;
                }
            }
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.woden.wsdl20.extensions.http.HTTPHeader#getTypeDefinition()
     */
    public TypeDefinition getTypeDefinition()
    {
        TypeDefinition typeDef = null;
        Description desc = getDescriptionComponent(getParent());
        typeDef = desc.getTypeDefinition(fTypeName);
        return typeDef;
    }
View Full Code Here

            QName name = elementDeclaration.getName();
            logger.info("ElementDeclaration[" + j + "] : name = " + name);
        }

        TypeDefinition typeDefinitions[] = descComp.getTypeDefinitions();
        logger.info("There are " + typeDefinitions.length
                + " TypeDefinition components.");

        for (int j = 0; j < typeDefinitions.length; j++) {
            TypeDefinition typeDefinition = typeDefinitions[j];

            QName name = typeDefinition.getName();
            logger.info("TypeDefinition[" + j + "] : name = " + name);
        }

        Interface interfaces[] = descComp.getInterfaces();
        logger.info("There are " + interfaces.length
View Full Code Here

     * TODO consider using Map instead of List
     */
    public TypeDefinition getTypeDefinition(QName qname)
    {
        if(!fComponentsInitialized) initComponents();
        TypeDefinition typeDef = null;
        if(qname != null)
        {
            Iterator i = fAllTypeDefinitions.iterator();
            while(i.hasNext())
            {
                TypeDefinition td = (TypeDefinition)i.next();
                if(qname.equals(td.getName()))
                {
                    typeDef = td;
                    break;
                }
            }
View Full Code Here

TOP

Related Classes of com.google.caja.config.WhiteList$TypeDefinition

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.