
com.ithit.webdav.integration.extendedattributes.ExtendedAttributeFactory Maven / Gradle / Ivy
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