Examples of Registries


Examples of org.apache.directory.shared.ldap.model.schema.registries.Registries

     * {@inheritDoc}
     */
    public boolean verify( Schema... schemas ) throws Exception
    {
        // Work on a cloned registries
        Registries clonedRegistries = cloneRegistries();

        // Loop on all the schemas
        for ( Schema schema : schemas )
        {
            try
            {
                // Inject the schema
                boolean loaded = load( clonedRegistries, schema );

                if ( !loaded )
                {
                    // We got an error : exit
                    clonedRegistries.clear();
                    return false;
                }

                // Now, check the registries
                List<Throwable> errors = clonedRegistries.checkRefInteg();

                if ( errors.size() != 0 )
                {
                    // We got an error : exit
                    clonedRegistries.clear();
                    return false;
                }
            }
            catch ( Exception e )
            {
                // We got an error : exit
                clonedRegistries.clear();
                return false;
            }
        }

        // We can now delete the cloned registries before exiting
        clonedRegistries.clear();

        return true;
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.schema.registries.Registries

            }

            if ( schema.isEnabled() && copy.isEnabled() )
            {
                // As we may break the registries, work on a cloned registries
                Registries clonedRegistries = null;

                try
                {
                    clonedRegistries = registries.clone();
                }
                catch ( CloneNotSupportedException cnse )
                {
                    throw new LdapOtherException( cnse.getMessage() );
                }

                // Inject the new SchemaObject in the cloned registries
                clonedRegistries.add( errors, copy );

                // Remove the cloned registries
                clonedRegistries.clear();

                // If we didn't get any error, apply the addition to the real retistries
                if ( errors.isEmpty() )
                {
                    // Copy again as the clonedRegistries clear has removed the previous copy
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.schema.registries.Registries

            }

            if ( schema.isEnabled() && schemaObject.isEnabled() )
            {
                // As we may break the registries, work on a cloned registries
                Registries clonedRegistries = null;

                try
                {
                    clonedRegistries = registries.clone();
                }
                catch ( CloneNotSupportedException cnse )
                {
                    throw new LdapOtherException( cnse.getMessage() );
                }

                // Delete the SchemaObject from the cloned registries
                clonedRegistries.delete( errors, toDelete );

                // Remove the cloned registries
                clonedRegistries.clear();

                // If we didn't get any error, apply the deletion to the real retistries
                if ( errors.isEmpty() )
                {
                    // Apply the deletion to the real registries
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.Registries

    FakeTimerService timerService = new FakeTimerService();
    PainterRegistryImpl paintRegistry = new PainterRegistryImpl(
            AnnotationPaint.SPREAD_FULL_TAGNAME, AnnotationPaint.BOUNDARY_FULL_TAGNAME,
            new AnnotationPainter(timerService));

    Registries registries =
        new RegistriesImpl(Editor.ROOT_HANDLER_REGISTRY,
            Editor.ROOT_ANNOTATION_REGISTRY, paintRegistry);

    StyleAnnotationHandler.register(registries);
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.Registries

  private SelectionAnnotationHandler handler;

  @Override
  protected void setUp() {
    Registries registries =
        new RegistriesImpl(mock(ElementHandlerRegistry.class), annotationRegistry, painterRegistry);
    handler = SelectionAnnotationHandler.register(
        registries, handlerTimer, markerFactory, me.id, profileManager);

    String content = "abcdefghij";
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.Registries

  }

  /** For testing purposes only. */
  public static ContentDocument createTestDocument() {
    ContentDocument doc = new ContentDocument(DocumentSchema.NO_SCHEMA_CONSTRAINTS);
    Registries registries = Editor.ROOT_REGISTRIES.createExtension();
    for (String t : new String[] {"q", "a", "b", "c", "x"}) {
      final String tag = t;
      registries.getElementHandlerRegistry().registerRenderer(tag,
          new Renderer() {
            @Override
            public Element createDomImpl(Renderable element) {
              return element.setAutoAppendContainer(Document.get().createElement(tag));
            }
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.Registries

    return new Builder();
  }

  /** Creates a per-conversation registries bundle. */
  private ConversationRegistries extendFor(Conversation c) {
    Registries r = registries.createExtension();
    for (ConversationInstaller ci : cis) {
      ci.install(((WaveletBasedConversation) c).getWavelet(), c, r);
    }
    return new ConversationRegistries(r, ((WaveletBasedConversation) c).getWavelet(), c);
  }
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.Registries

      (gis = lazyCreate(gis)).add(g);
      return this;
    }

    public DocumentRegistries build() {
      Registries root = Editor.ROOT_REGISTRIES;
      for (GlobalInstaller gi : nonNull(gis)) {
        gi.install(root);
      }
      return new DocumentRegistries(root, nonNull(cis), nonNull(bis));
    }
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.Registries

    /**
     * Extends this conversation's registres for a blip. Per-blip doodads are
     * installed in the new registries.
     */
    private Registries extendFor(ConversationBlip b) {
      Registries r = registries.createExtension();
      for (BlipInstaller bi : bis) {
        bi.install(w, c, b, r);
      }
      return r;
    }
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.Registries

    /**
     * @return the registries for a blip, lazily creating one if none exists.
     */
    Registries getBlipRegistries(ConversationBlip b) {
      Registries rs = blipRegistries.get(b);
      if (rs == null) {
        rs = extendFor(b);
        blipRegistries.put(b, rs);
      }
      return rs;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.