
com.ithit.webdav.integration.extendedattributes.ExtendedAttributeFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jakarta-integration Show documentation
Show all versions of jakarta-integration Show documentation
IT Hit WebDAV integration for new Jakarta Java servlet containers
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