All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ithit.webdav.integration.extendedattributes.ExtendedAttributeFactory Maven / Gradle / Ivy

There is a newer version: 7.3.10641
Show newest version
package com.ithit.webdav.integration.extendedattributes;

/**
 * Factory-singleton which creates a ExtendedAttribute instance.
 * Instance is valid for the current platform.
 */
final class ExtendedAttributeFactory {

    private ExtendedAttributeFactory() {
    }

    private static ExtendedAttribute extendedAttribute;

    /**
     * Builds a specific ExtendedAttribute for the current platform.
     *
     * @return Platform specific instance of ExtendedAttribute.
     */
    static synchronized ExtendedAttribute buildFileExtendedAttributeSupport() {
        if (extendedAttribute == null) {
            if (System.getProperty("os.name").toLowerCase().contains("mac")) {
                extendedAttribute = new OSXExtendedAttribute();
            } else {
                extendedAttribute = new DefaultExtendedAttribute();
            }
        }
        return extendedAttribute;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy