Package com.volantis.devrep.repository.api.devices

Examples of com.volantis.devrep.repository.api.devices.DefaultDevice


    // Javadoc inherited from super class.
    public DefaultDevice getDeviceFallbackChain(RepositoryConnection connection,
                                                 String deviceName)
            throws RepositoryException {

        DefaultDevice device = retrieveDevice(connection, deviceName);
        if (device == null) {
            return null;
        }

        String fallbackDeviceName = device.getFallbackDeviceName();
        if (fallbackDeviceName != null) {
            device.setFallbackDevice(getDeviceFallbackChain(connection,
                                                            fallbackDeviceName));
        }

        return device;
    }
View Full Code Here


    public DefaultDevice retrieveDevice(RepositoryConnection connection,
                                         String deviceName)
            throws RepositoryException {

        // Look in the cache first.
        DefaultDevice device = getDeviceFromCache(deviceName);
        if (device != null) {
            return device;
        }

        if (deviceCache != null) {
View Full Code Here

        if (deviceCache == null) {
            return null;
        }

        DefaultDevice device = (DefaultDevice) deviceCache.get(deviceName);

        if (device != null) {
            if (logger.isDebugEnabled()) {
                logger.debug("Retrieved device named \"" + deviceName
                             + "\" from cache");
View Full Code Here

        if (deviceCache == null) {
            return;
        }

        DefaultDevice device = (DefaultDevice) deviceCache.remove(deviceName);

        if (device == null) {
            if (logger.isDebugEnabled()) {
                logger.debug("Could not find device named \"" + deviceName
                             + "\" in cache");
View Full Code Here

    public void renameDevice(RepositoryConnection connection,
                             String deviceName, String newName)
            throws RepositoryException {

        // Look in the cache first.
        DefaultDevice device = (DefaultDevice) getDeviceFromCache(deviceName);
        if (device != null) {
            removeDeviceFromCache(deviceName);
            device.setName(newName);
            addDeviceToCache(device);
        }

        renameDeviceImpl(connection, deviceName, newName);
    }
View Full Code Here

        policyMock.expects.getDeviceTargetedVariant("device").returns(
            deviceVariantMock).any();
        policyMock.expects.getDeviceTargetedVariant("fallback device").returns(
            fallbackDeviceVariantMock).any();

        final DefaultDevice fallbackDevice =
            new DefaultDevice("fallback device", new HashMap(), null);
        final DefaultDevice device =
            new DefaultDevice("device", new HashMap(), null);
        device.setFallbackDevice(fallbackDevice);

        final DefaultDevice testDefaultDevice =
            new DefaultDevice("test device", new HashMap(), null);
        testDefaultDevice.setFallbackDevice(device);
        final InternalDevice testDevice =
            INTERNAL_DEVICE_FACTORY.createInternalDevice(testDefaultDevice);
        final LinkedList styles = new LinkedList();
        RuntimeThemeCreator.addParentRules(policyMock, testDevice, styles);
        assertEquals(2, styles.size());
View Full Code Here

TOP

Related Classes of com.volantis.devrep.repository.api.devices.DefaultDevice

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.