Examples of Sequencer


Examples of org.modeshape.jcr.api.sequencer.Sequencer

            this.pathExpressionsBySequencerId = new HashMap<UUID, Collection<SequencerPathExpression>>();

            String repoName = repository.name();
            for (Component component : components) {
                try {
                    Sequencer sequencer = component.createInstance(getClass().getClassLoader());
                    // Set the repository name field ...
                    ReflectionUtil.setValue(sequencer, "repositoryName", repoName);

                    // Set the logger instance
                    ReflectionUtil.setValue(sequencer, "logger", ExtensionLogger.getLogger(sequencer.getClass()));
                    // We'll initialize it later in #intialize() ...

                    sequencersByName.put(sequencer.getName(), sequencer);
                    if (sequencer.getPathExpressions().length == 0) {
                        // There are no path expressions, so this sequencer is only for explicit invocation ...
                        if (DEBUG) {
                            LOGGER.debug("Created sequencer '{0}' in repository '{1}' with no path expression; availabe only for explicit invocation",
                                         sequencer.getName(), repository.name());
                        }

                    } else {
                        // For each sequencer, figure out which workspaces apply ...
                        UUID uuid = sequencer.getUniqueId();
                        sequencersById.put(sequencer.getUniqueId(), sequencer);
                        // For each sequencer, create the path expressions ...

                        Set<SequencerPathExpression> pathExpressions = buildPathExpressionSet(sequencer);
                        pathExpressionsBySequencerId.put(uuid, pathExpressions);
                        if (DEBUG) {
                            LOGGER.debug("Created sequencer '{0}' in repository '{1}' with valid path expressions: {2}",
                                         sequencer.getName(), repository.name(), pathExpressions);
                        }
                    }
                } catch (Throwable t) {
                    if (t.getCause() != null) {
                        t = t.getCause();
View Full Code Here

Examples of org.modeshape.jcr.api.sequencer.Sequencer

                                                + nodeTypeManager.getClass().getName());
            }

            // Initialize each sequencer using the supplied session ...
            for (Iterator<Map.Entry<String, Sequencer>> sequencersIterator = sequencersByName.entrySet().iterator(); sequencersIterator.hasNext();) {
                Sequencer sequencer = sequencersIterator.next().getValue();
                try {
                    sequencer.initialize(registry, (org.modeshape.jcr.api.nodetype.NodeTypeManager)nodeTypeManager);

                    // If successful, call the 'postInitialize' method reflectively (due to inability to call directly) ...
                    Method postInitialize = ReflectionUtil.findMethod(Sequencer.class, "postInitialize");
                    ReflectionUtil.invokeAccessibly(sequencer, postInitialize, new Object[] {});
                    if (DEBUG) {
                        LOGGER.debug("Successfully initialized sequencer '{0}' in repository '{1}'", sequencer.getName(),
                                     repository.name());
                    }
                    initialized.add(sequencer);
                } catch (Throwable t) {
                    if (t.getCause() != null) {
                        t = t.getCause();
                    }
                    repository.error(t, JcrI18n.unableToInitializeSequencer, sequencer, repository.name(), t.getMessage());
                    try {
                        sequencersIterator.remove();
                    } finally {
                        sequencersById.remove(sequencer.getUniqueId());
                    }
                }
            }
            this.initialized = true;
        } catch (RepositoryException e) {
View Full Code Here

Examples of org.uberfire.client.workbench.widgets.animations.Sequencer

                super.onComplete();
                onCompleteCommand.execute();
            }

        };
        final Sequencer s = new Sequencer();
        s.add( fadeInAnimation, 250 );
        s.add( pauseAnimation, 2000 );
        s.run();
    }
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.