Package com.day.cq.replication

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


        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

        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

        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

        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

        // 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

     * @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

        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

TOP

Related Classes of com.day.cq.replication.ReplicationActionType

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.