Examples of ReplicationActionType


Examples of com.day.cq.replication.ReplicationActionType

    public void testFlush_2() throws Exception {
        final ResourceResolver resourceResolver = mock(ResourceResolver.class);
        final Session session = mock(Session.class);
        when(resourceResolver.adaptTo(Session.class)).thenReturn(session);

        final ReplicationActionType actionType = ReplicationActionType.DELETE;
        final boolean synchronous = false;

        final String path1 = "/content/foo";
        final String path2 = "/content/bar";
View Full Code Here

Examples of com.day.cq.replication.ReplicationActionType

        reset(dispatcherFlusher, resourceResolverFactory, hierarchicalFlushRules, resourceOnlyFlushRules);
    }

    @Test
    public void testConfigureReplicationActionType_ACTIVATE() throws Exception {
        final ReplicationActionType expected = ReplicationActionType.ACTIVATE;
        final ReplicationActionType actual = dispatcherFlushRules.configureReplicationActionType("ACTIVATE");

        assertEquals(expected, actual);
    }
View Full Code Here

Examples of com.day.cq.replication.ReplicationActionType

        assertEquals(expected, actual);
    }

    @Test
    public void testConfigureReplicationActionType_DELETE() throws Exception {
        final ReplicationActionType expected = ReplicationActionType.DELETE;
        final ReplicationActionType actual = dispatcherFlushRules.configureReplicationActionType("DELETE");

        assertEquals(expected, actual);
    }
View Full Code Here

Examples of com.day.cq.replication.ReplicationActionType

        assertEquals(expected, actual);
    }

    @Test
    public void testConfigureReplicationActionType_DEACTIVATE() throws Exception {
        final ReplicationActionType expected = ReplicationActionType.DEACTIVATE;
        final ReplicationActionType actual = dispatcherFlushRules.configureReplicationActionType("DEACTIVATE");

        assertEquals(expected, actual);
    }
View Full Code Here

Examples of com.day.cq.replication.ReplicationActionType

        assertEquals(expected, actual);
    }

    @Test
    public void testConfigureReplicationActionType_INHERIT() throws Exception {
        final ReplicationActionType expected = null;
        final ReplicationActionType actual = dispatcherFlushRules.configureReplicationActionType("INHERIT");

        assertEquals(expected, actual);
    }
View Full Code Here

Examples of com.day.cq.replication.ReplicationActionType

        // Path being replicated
        final String path = replicationAction.getPath();

        // Replication action type occurring
        final ReplicationActionType flushActionType =
                replicationActionType == null ? replicationAction.getType() : replicationActionType;

        ResourceResolver resourceResolver = null;

        try {
View Full Code Here

Examples of com.day.cq.replication.ReplicationActionType

     * @return the ReplicationActionType to use, or null if the ReplicationActionType should be inherited from the
     * incoming ReplicationAction
     */
    protected final ReplicationActionType configureReplicationActionType(final String replicationActionTypeName) {
        try {
            final ReplicationActionType repActionType =
                    ReplicationActionType.valueOf(replicationActionTypeName);
            log.debug("Using replication action type: {}", repActionType.name());
            return repActionType;
        } catch (IllegalArgumentException ex) {
            log.debug("Using replication action type: {}", OPTION_INHERIT);
            return null;
        }
View Full Code Here

Examples of com.day.cq.replication.ReplicationActionType

        final ValueMap properties = ResourceUtil.getValueMap(resource);

        /* Properties */
        final String[] paths = properties.get("paths", new String[0]);
        final ReplicationActionType replicationActionType = ReplicationActionType.valueOf(properties.get(
                "replicationActionType", ReplicationActionType.ACTIVATE.name()));

        final List<FlushResult> overallResults = new ArrayList<FlushResult>();
        boolean caughtException = false;

View Full Code Here

Examples of org.apache.sling.replication.communication.ReplicationActionType

        public TriggerAgentEventListener(ReplicationRequestHandler requestHandler) {
            this.requestHandler = requestHandler;
        }

        public void handleEvent(Event event) {
            ReplicationActionType action = SlingConstants.TOPIC_RESOURCE_REMOVED.equals(event.getTopic()) ?
                    ReplicationActionType.DELETE : ReplicationActionType.ADD;
            log.info("triggering replication from event {}", event);

            Object pathProperty = event.getProperty("path");
            if (pathProperty != null) {
View Full Code Here

Examples of org.apache.sling.replication.communication.ReplicationActionType

                String[] paths = (String[]) pathProperty;
                for (String p : paths) {
                    if (p.startsWith(path)) {
                        log.info("triggering chain replication from event {}", event);

                        ReplicationActionType action = ReplicationActionType.valueOf(String.valueOf(actionProperty));
                        requestHandler.handle(new ReplicationRequest(System.currentTimeMillis(), action, paths));
                        break;
                    }
                }
            }
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.