Search in sources :

Example 51 with StringUtils.isEmpty

use of org.apache.commons.lang3.StringUtils.isEmpty in project cuba by cuba-platform.

the class ScreensHelper method isEntityAvailable.

protected boolean isEntityAvailable(Element window, Class<? extends FrameOwner> controllerClass, Class entityClass, ScreenType filterScreenType, boolean useComplexSearch) {
    Element dsContext = window.element("dsContext");
    Element data = window.element("data");
    if (dsContext == null && data == null) {
        return false;
    }
    Element dataElement = data != null ? data : dsContext;
    if (!useComplexSearch) {
        String dataElementId = data != null ? getDataContainerId(window, controllerClass, filterScreenType) : getDatasourceId(window, filterScreenType);
        if (StringUtils.isEmpty(dataElementId)) {
            return false;
        }
        return isEntityAvailableInDataElement(entityClass, dataElement, dataElementId);
    }
    if (!checkWindowType(controllerClass, filterScreenType)) {
        return false;
    }
    List<Element> dataElements = dataElement.elements();
    List<String> dataElementIds = dataElements.stream().filter(de -> isEntityAvailableInDataElement(entityClass, de)).map(de -> de.attributeValue("id")).collect(Collectors.toList());
    if (!ScreenType.BROWSER.equals(filterScreenType)) {
        String editedEntityDataElementId = data != null ? resolveEditedEntityContainerId(controllerClass) : window.attributeValue("datasource");
        dataElementIds.addAll(getDataElementsIdForComposition(dataElement, entityClass, editedEntityDataElementId));
    }
    return dataElementIds.size() > 0;
}
Also used : Fragment(com.haulmont.cuba.gui.components.Fragment) Document(org.dom4j.Document) java.util(java.util) RowsCount(com.haulmont.cuba.gui.components.RowsCount) Dom4jTools(com.haulmont.cuba.core.sys.xmlparsing.Dom4jTools) ReflectionHelper(com.haulmont.bali.util.ReflectionHelper) Table(com.haulmont.cuba.gui.components.Table) LoggerFactory(org.slf4j.LoggerFactory) StringUtils(org.apache.commons.lang3.StringUtils) MetaClass(com.haulmont.chile.core.model.MetaClass) Metadata(com.haulmont.cuba.core.global.Metadata) Inject(javax.inject.Inject) Strings(com.google.common.base.Strings) MetadataTools(com.haulmont.cuba.core.global.MetadataTools) ImmutableList(com.google.common.collect.ImmutableList) Window(com.haulmont.cuba.gui.components.Window) EditedEntityContainer(com.haulmont.cuba.gui.screen.EditedEntityContainer) LayoutLoaderConfig(com.haulmont.cuba.gui.xml.layout.LayoutLoaderConfig) XmlInheritanceProcessor(com.haulmont.cuba.gui.xml.XmlInheritanceProcessor) FieldGroup(com.haulmont.cuba.gui.components.FieldGroup) Nullable(javax.annotation.Nullable) Frame(com.haulmont.cuba.gui.components.Frame) Collections.emptyMap(java.util.Collections.emptyMap) ScreenComponentDescriptor(com.haulmont.cuba.gui.components.ScreenComponentDescriptor) WindowInfo(com.haulmont.cuba.gui.config.WindowInfo) Logger(org.slf4j.Logger) ImmutableMap(com.google.common.collect.ImmutableMap) Form(com.haulmont.cuba.gui.components.Form) MetaProperty(com.haulmont.chile.core.model.MetaProperty) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) FrameOwner(com.haulmont.cuba.gui.screen.FrameOwner) LookupComponent(com.haulmont.cuba.gui.screen.LookupComponent) UserSessionSource(com.haulmont.cuba.core.global.UserSessionSource) Collectors(java.util.stream.Collectors) FileNotFoundException(java.io.FileNotFoundException) ComponentLoader(com.haulmont.cuba.gui.xml.layout.ComponentLoader) Component(org.springframework.stereotype.Component) Resources(com.haulmont.cuba.core.global.Resources) WindowConfig(com.haulmont.cuba.gui.config.WindowConfig) BeanLocator(com.haulmont.cuba.core.global.BeanLocator) Element(org.dom4j.Element) MessageTools(com.haulmont.cuba.core.global.MessageTools) Element(org.dom4j.Element)

Example 52 with StringUtils.isEmpty

use of org.apache.commons.lang3.StringUtils.isEmpty in project syndesis by syndesisio.

the class ConnectorIconHandler method get.

@GET
@SuppressWarnings("PMD.CyclomaticComplexity")
public Response get() {
    String connectorIcon = connector.getIcon();
    if (connectorIcon == null) {
        return Response.status(Response.Status.NOT_FOUND).build();
    }
    if (connectorIcon.startsWith("db:")) {
        String connectorIconId = connectorIcon.substring(3);
        Icon icon = getDataManager().fetch(Icon.class, connectorIconId);
        if (icon == null) {
            return Response.status(Response.Status.NOT_FOUND).build();
        }
        final StreamingOutput streamingOutput = (out) -> {
            try (BufferedSink sink = Okio.buffer(Okio.sink(out));
                Source source = Okio.source(iconDao.read(connectorIconId))) {
                sink.writeAll(source);
            }
        };
        return Response.ok(streamingOutput, icon.getMediaType()).build();
    } else if (connectorIcon.startsWith("extension:")) {
        String iconFile = connectorIcon.substring(10);
        Optional<InputStream> extensionIcon = connector.getDependencies().stream().filter(Dependency::isExtension).map(Dependency::getId).findFirst().flatMap(extensionId -> extensionDataManager.getExtensionIcon(extensionId, iconFile));
        if (extensionIcon.isPresent()) {
            final StreamingOutput streamingOutput = (out) -> {
                final BufferedSink sink = Okio.buffer(Okio.sink(out));
                sink.writeAll(Okio.source(extensionIcon.get()));
                sink.close();
            };
            return Response.ok(streamingOutput, extensionDataManager.getExtensionIconMediaType(iconFile)).build();
        } else {
            return Response.status(Response.Status.NOT_FOUND).build();
        }
    }
    // font awesome class name), return 404
    if (connectorIcon.startsWith("data:") || !connectorIcon.contains("/")) {
        return Response.status(Response.Status.NOT_FOUND).build();
    }
    final OkHttpClient httpClient = new OkHttpClient();
    try {
        final okhttp3.Response externalResponse = httpClient.newCall(new Request.Builder().get().url(connectorIcon).build()).execute();
        final String contentType = externalResponse.header(CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM);
        final String contentLength = externalResponse.header(CONTENT_LENGTH);
        final StreamingOutput streamingOutput = (out) -> {
            final BufferedSink sink = Okio.buffer(Okio.sink(out));
            sink.writeAll(externalResponse.body().source());
            sink.close();
        };
        final Response.ResponseBuilder actualResponse = Response.ok(streamingOutput, contentType);
        if (!StringUtils.isEmpty(contentLength)) {
            actualResponse.header(CONTENT_LENGTH, contentLength);
        }
        return actualResponse.build();
    } catch (final IOException e) {
        throw new SyndesisServerException(e);
    }
}
Also used : CONTENT_TYPE(javax.ws.rs.core.HttpHeaders.CONTENT_TYPE) Okio(okio.Okio) BufferedInputStream(java.io.BufferedInputStream) Produces(javax.ws.rs.Produces) Source(okio.Source) GET(javax.ws.rs.GET) ApiResponses(io.swagger.annotations.ApiResponses) StringUtils(org.apache.commons.lang3.StringUtils) ApiOperation(io.swagger.annotations.ApiOperation) MediaType(javax.ws.rs.core.MediaType) InputPart(org.jboss.resteasy.plugins.providers.multipart.InputPart) Consumes(javax.ws.rs.Consumes) BufferedSink(okio.BufferedSink) URLConnection(java.net.URLConnection) DataManager(io.syndesis.server.dao.manager.DataManager) FileDataManager(io.syndesis.server.dao.file.FileDataManager) Api(io.swagger.annotations.Api) Icon(io.syndesis.common.model.icon.Icon) CONTENT_LENGTH(javax.ws.rs.core.HttpHeaders.CONTENT_LENGTH) Request(okhttp3.Request) POST(javax.ws.rs.POST) Connector(io.syndesis.common.model.connection.Connector) IOException(java.io.IOException) StreamingOutput(javax.ws.rs.core.StreamingOutput) Dependency(io.syndesis.common.model.Dependency) OkHttpClient(okhttp3.OkHttpClient) Response(javax.ws.rs.core.Response) ApiResponse(io.swagger.annotations.ApiResponse) SyndesisServerException(io.syndesis.common.util.SyndesisServerException) Optional(java.util.Optional) MultipartFormDataInput(org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput) IconDao(io.syndesis.server.dao.file.IconDao) BaseHandler(io.syndesis.server.endpoint.v1.handler.BaseHandler) InputStream(java.io.InputStream) OkHttpClient(okhttp3.OkHttpClient) Optional(java.util.Optional) SyndesisServerException(io.syndesis.common.util.SyndesisServerException) Request(okhttp3.Request) StreamingOutput(javax.ws.rs.core.StreamingOutput) BufferedSink(okio.BufferedSink) Dependency(io.syndesis.common.model.Dependency) IOException(java.io.IOException) Source(okio.Source) Response(javax.ws.rs.core.Response) ApiResponse(io.swagger.annotations.ApiResponse) Icon(io.syndesis.common.model.icon.Icon) GET(javax.ws.rs.GET)

Example 53 with StringUtils.isEmpty

use of org.apache.commons.lang3.StringUtils.isEmpty in project BroadleafCommerce by BroadleafCommerce.

the class ContentProcessor method populateModelVariables.

@Override
public Map<String, Object> populateModelVariables(String tagName, Map<String, String> tagAttributes, BroadleafTemplateContext context) {
    String contentType = tagAttributes.get("contentType");
    String contentName = tagAttributes.get("contentName");
    String maxResultsStr = tagAttributes.get("maxResults");
    if (StringUtils.isEmpty(contentType) && StringUtils.isEmpty(contentName)) {
        throw new IllegalArgumentException("The content processor must have a non-empty attribute value for 'contentType' or 'contentName'");
    }
    Integer maxResults = null;
    if (maxResultsStr != null) {
        maxResults = Ints.tryParse(maxResultsStr);
    }
    if (maxResults == null) {
        maxResults = Integer.MAX_VALUE;
    }
    String contentListVar = getAttributeValue(tagAttributes, "contentListVar", "contentList");
    String contentItemVar = getAttributeValue(tagAttributes, "contentItemVar", "contentItem");
    String numResultsVar = getAttributeValue(tagAttributes, "numResultsVar", "numResults");
    String fieldFilters = tagAttributes.get("fieldFilters");
    final String sorts = tagAttributes.get("sorts");
    BroadleafRequestContext blcContext = BroadleafRequestContext.getBroadleafRequestContext();
    HttpServletRequest request = blcContext.getRequest();
    Map<String, Object> mvelParameters = buildMvelParameters(blcContext.getRequest(), tagAttributes, context);
    SandBox currentSandbox = blcContext.getSandBox();
    List<StructuredContentDTO> contentItems;
    StructuredContentType structuredContentType = null;
    if (contentType != null) {
        structuredContentType = structuredContentService.findStructuredContentTypeByName(contentType);
    }
    Locale locale = blcContext.getLocale();
    Map<String, Object> newModelVars = new HashMap<>();
    contentItems = getContentItems(contentName, maxResults, request, mvelParameters, currentSandbox, structuredContentType, locale, tagName, tagAttributes, newModelVars, context);
    if (contentItems.size() > 0) {
        // sort the resulting list by the configured property sorts on the tag
        if (StringUtils.isNotEmpty(sorts)) {
            final BroadleafTemplateContext finalContext = context;
            // In order to use the context in a comparator it needs to be final
            Collections.sort(contentItems, new Comparator<StructuredContentDTO>() {

                @Override
                public int compare(StructuredContentDTO o1, StructuredContentDTO o2) {
                    List<BroadleafAssignation> sortAssignments = finalContext.getAssignationSequence(sorts, false);
                    CompareToBuilder compareBuilder = new CompareToBuilder();
                    for (BroadleafAssignation sortAssignment : sortAssignments) {
                        String property = sortAssignment.getLeftStringRepresentation(finalContext);
                        Object val1 = o1.getPropertyValue(property);
                        Object val2 = o2.getPropertyValue(property);
                        if (sortAssignment.parseRight(finalContext).equals("ASCENDING")) {
                            compareBuilder.append(val1, val2);
                        } else {
                            compareBuilder.append(val2, val1);
                        }
                    }
                    return compareBuilder.toComparison();
                }
            });
        }
        List<Map<String, Object>> contentItemFields = new ArrayList<>();
        for (StructuredContentDTO item : contentItems) {
            if (StringUtils.isNotEmpty(fieldFilters)) {
                List<BroadleafAssignation> assignments = context.getAssignationSequence(fieldFilters, false);
                boolean valid = true;
                for (BroadleafAssignation assignment : assignments) {
                    if (ObjectUtils.notEqual(assignment.parseRight(context), item.getValues().get(assignment.getLeftStringRepresentation(context)))) {
                        LOG.info("Excluding content " + item.getId() + " based on the property value of " + assignment.getLeftStringRepresentation(context));
                        valid = false;
                        break;
                    }
                }
                if (valid) {
                    contentItemFields.add(item.getValues());
                }
            } else {
                contentItemFields.add(item.getValues());
            }
        }
        Map<String, Object> contentItem = null;
        if (contentItemFields.size() > 0) {
            contentItem = contentItemFields.get(0);
        }
        newModelVars.put(contentItemVar, contentItem);
        newModelVars.put(contentListVar, contentItemFields);
        newModelVars.put(numResultsVar, contentItems.size());
    } else {
        if (LOG.isInfoEnabled()) {
            LOG.info("**************************The contentItems is null*************************");
        }
        newModelVars.put(contentItemVar, null);
        newModelVars.put(contentListVar, null);
        newModelVars.put(numResultsVar, 0);
    }
    String deepLinksVar = tagAttributes.get("deepLinks");
    if (StringUtils.isNotBlank(deepLinksVar) && contentItems.size() > 0) {
        List<DeepLink> links = contentDeepLinkService.getLinks(contentItems.get(0));
        extensionManager.getProxy().addExtensionFieldDeepLink(links, tagName, tagAttributes, context);
        extensionManager.getProxy().postProcessDeepLinks(links);
        newModelVars.put(deepLinksVar, links);
    }
    return newModelVars;
}
Also used : Locale(org.broadleafcommerce.common.locale.domain.Locale) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) HttpServletRequest(javax.servlet.http.HttpServletRequest) ArrayList(java.util.ArrayList) List(java.util.List) CompareToBuilder(org.apache.commons.lang3.builder.CompareToBuilder) BroadleafTemplateContext(org.broadleafcommerce.presentation.model.BroadleafTemplateContext) SandBox(org.broadleafcommerce.common.sandbox.domain.SandBox) StructuredContentDTO(org.broadleafcommerce.common.structure.dto.StructuredContentDTO) BroadleafRequestContext(org.broadleafcommerce.common.web.BroadleafRequestContext) DeepLink(org.broadleafcommerce.common.web.deeplink.DeepLink) StructuredContentType(org.broadleafcommerce.cms.structure.domain.StructuredContentType) BroadleafAssignation(org.broadleafcommerce.presentation.model.BroadleafAssignation) HashMap(java.util.HashMap) Map(java.util.Map)

Example 54 with StringUtils.isEmpty

use of org.apache.commons.lang3.StringUtils.isEmpty in project azure-tools-for-java by Microsoft.

the class FunctionNode method trigger.

@AzureOperation(name = "function|trigger.start.detail", params = { "this.functionApp.name()" }, type = AzureOperation.Type.SERVICE)
private void trigger() {
    final FunctionEntity.BindingEntity trigger = functionEntity.getTrigger();
    final String triggerType = Optional.ofNullable(trigger).map(functionTrigger -> functionTrigger.getProperty("type")).orElse(null);
    if (StringUtils.isEmpty(triggerType)) {
        final String error = String.format("failed to get trigger type of function[%s].", functionApp.name());
        final String action = "confirm trigger type is configured.";
        throw new AzureToolkitRuntimeException(error, action);
    }
    switch(triggerType.toLowerCase()) {
        case "httptrigger":
            triggerHttpTrigger(trigger);
            break;
        case "timertrigger":
            // no input for timer trigger
            functionApp.triggerFunction(this.name, new Object());
            break;
        default:
            final String input = DefaultLoader.getUIHelper().showInputDialog(tree.getParent(), "Please set the input value: ", String.format("Trigger function %s", this.name), null);
            functionApp.triggerFunction(this.name, new TriggerRequest(input));
            break;
    }
}
Also used : AzureOperation(com.microsoft.azure.toolkit.lib.common.operation.AzureOperation) Node(com.microsoft.tooling.msservices.serviceexplorer.Node) RequiredArgsConstructor(lombok.RequiredArgsConstructor) AzureOperationBundle(com.microsoft.azure.toolkit.lib.common.operation.AzureOperationBundle) HashMap(java.util.HashMap) StringUtils(org.apache.commons.lang3.StringUtils) AzureTask(com.microsoft.azure.toolkit.lib.common.task.AzureTask) AppInsightsConstants(com.microsoft.azuretools.telemetry.AppInsightsConstants) TRIGGER_FUNCTION(com.microsoft.azuretools.telemetry.TelemetryConstants.TRIGGER_FUNCTION) WrappedTelemetryNodeActionListener(com.microsoft.tooling.msservices.serviceexplorer.WrappedTelemetryNodeActionListener) EnumUtils(org.apache.commons.lang3.EnumUtils) AuthorizationLevel(com.microsoft.azure.functions.annotation.AuthorizationLevel) Map(java.util.Map) AzureString(com.microsoft.azure.toolkit.lib.common.bundle.AzureString) DefaultLoader(com.microsoft.tooling.msservices.components.DefaultLoader) Nonnull(javax.annotation.Nonnull) NodeActionListener(com.microsoft.tooling.msservices.serviceexplorer.NodeActionListener) AzureToolkitRuntimeException(com.microsoft.azure.toolkit.lib.common.exception.AzureToolkitRuntimeException) TelemetryProperties(com.microsoft.azuretools.telemetry.TelemetryProperties) IFunctionApp(com.microsoft.azure.toolkit.lib.appservice.service.IFunctionApp) Optional(java.util.Optional) Utils(com.microsoft.azure.toolkit.lib.appservice.utils.Utils) FUNCTION(com.microsoft.azuretools.telemetry.TelemetryConstants.FUNCTION) OperatingSystem(com.microsoft.azure.toolkit.lib.appservice.model.OperatingSystem) NodeActionEvent(com.microsoft.tooling.msservices.serviceexplorer.NodeActionEvent) FunctionEntity(com.microsoft.azure.toolkit.lib.appservice.entity.FunctionEntity) AzureTaskManager(com.microsoft.azure.toolkit.lib.common.task.AzureTaskManager) FunctionEntity(com.microsoft.azure.toolkit.lib.appservice.entity.FunctionEntity) AzureToolkitRuntimeException(com.microsoft.azure.toolkit.lib.common.exception.AzureToolkitRuntimeException) AzureString(com.microsoft.azure.toolkit.lib.common.bundle.AzureString) AzureOperation(com.microsoft.azure.toolkit.lib.common.operation.AzureOperation)

Example 55 with StringUtils.isEmpty

use of org.apache.commons.lang3.StringUtils.isEmpty in project azure-tools-for-java by Microsoft.

the class FunctionUtils method patchStorageBinding.

private static void patchStorageBinding(final PsiMethod method, final List<Binding> bindings) {
    final PsiAnnotation storageAccount = AnnotationUtil.findAnnotation(method, StorageAccount.class.getCanonicalName());
    if (storageAccount != null) {
        // todo: Remove System.out.println
        System.out.println(message("function.binding.storage.found"));
        final String connectionString = AnnotationUtil.getDeclaredStringAttributeValue(storageAccount, "value");
        // Replace empty connection string
        bindings.stream().filter(binding -> binding.getBindingEnum().isStorage()).filter(binding -> StringUtils.isEmpty((String) binding.getAttribute("connection"))).forEach(binding -> binding.setAttribute("connection", connectionString));
    } else {
        // todo: Remove System.out.println
        System.out.println(message("function.binding.storage.notFound"));
    }
}
Also used : JsonObject(com.google.gson.JsonObject) Azure(com.microsoft.azure.toolkit.lib.Azure) AzureExecutionException(com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException) Arrays(java.util.Arrays) AzureConfiguration(com.microsoft.azure.toolkit.lib.AzureConfiguration) AzureBundle.message(com.microsoft.intellij.ui.messages.AzureBundle.message) OrderEnumerator(com.intellij.openapi.roots.OrderEnumerator) JsonUtils(com.microsoft.azuretools.utils.JsonUtils) VirtualFile(com.intellij.openapi.vfs.VirtualFile) StringUtils(org.apache.commons.lang3.StringUtils) Library(com.intellij.openapi.roots.libraries.Library) ClassUtils(org.apache.commons.lang3.ClassUtils) PsiJavaCodeReferenceElement(com.intellij.psi.PsiJavaCodeReferenceElement) Map(java.util.Map) Module(com.intellij.openapi.module.Module) CompilerModuleExtension(com.intellij.openapi.roots.CompilerModuleExtension) Path(java.nio.file.Path) MavenProject(org.jetbrains.idea.maven.project.MavenProject) FunctionCliResolver(com.microsoft.azure.toolkit.lib.appservice.utils.FunctionCliResolver) OrderRootType(com.intellij.openapi.roots.OrderRootType) Nullable(com.microsoft.azuretools.azurecommons.helpers.Nullable) MetaAnnotationUtil(com.intellij.codeInsight.MetaAnnotationUtil) GlobalSearchScope(com.intellij.psi.search.GlobalSearchScope) Collectors(java.util.stream.Collectors) MavenProjectsManager(org.jetbrains.idea.maven.project.MavenProjectsManager) List(java.util.List) AnnotatedElementsSearch(com.intellij.psi.search.searches.AnnotatedElementsSearch) AnnotationUtil(com.intellij.codeInsight.AnnotationUtil) PsiAnnotation(com.intellij.psi.PsiAnnotation) IntelliJSecureStore(com.microsoft.intellij.secure.IntelliJSecureStore) JvmParameter(com.intellij.lang.jvm.JvmParameter) AzureOperation(com.microsoft.azure.toolkit.lib.common.operation.AzureOperation) ModuleManager(com.intellij.openapi.module.ModuleManager) JavaPsiFacade(com.intellij.psi.JavaPsiFacade) ArrayUtils(org.apache.commons.lang3.ArrayUtils) HashMap(java.util.HashMap) ContainerUtil(com.intellij.util.containers.ContainerUtil) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) PsiClass(com.intellij.psi.PsiClass) Charset(java.nio.charset.Charset) Project(com.intellij.openapi.project.Project) FunctionConfiguration(com.microsoft.azure.toolkit.lib.legacy.function.configurations.FunctionConfiguration) Binding(com.microsoft.azure.toolkit.lib.legacy.function.bindings.Binding) AzureToolkitRuntimeException(com.microsoft.azure.toolkit.lib.common.exception.AzureToolkitRuntimeException) PsiModifierListOwner(com.intellij.psi.PsiModifierListOwner) PsiMethod(com.intellij.psi.PsiMethod) MapUtils(org.apache.commons.collections.MapUtils) Files(java.nio.file.Files) FileUtils(org.apache.commons.io.FileUtils) IOException(java.io.IOException) JvmAnnotation(com.intellij.lang.jvm.JvmAnnotation) File(java.io.File) BindingEnum(com.microsoft.azure.toolkit.lib.legacy.function.bindings.BindingEnum) Paths(java.nio.file.Paths) Log(com.microsoft.azure.toolkit.lib.common.logging.Log) StorageAccount(com.microsoft.azure.functions.annotation.StorageAccount) StorageAccount(com.microsoft.azure.functions.annotation.StorageAccount) PsiAnnotation(com.intellij.psi.PsiAnnotation)

Aggregations

StringUtils (org.apache.commons.lang3.StringUtils)62 List (java.util.List)46 ArrayList (java.util.ArrayList)35 Map (java.util.Map)33 Collectors (java.util.stream.Collectors)33 HashMap (java.util.HashMap)25 Set (java.util.Set)23 Collections (java.util.Collections)21 IOException (java.io.IOException)20 Arrays (java.util.Arrays)20 HashSet (java.util.HashSet)16 Optional (java.util.Optional)16 Logger (org.slf4j.Logger)16 LoggerFactory (org.slf4j.LoggerFactory)15 Collection (java.util.Collection)14 File (java.io.File)9 URI (java.net.URI)8 Comparator (java.util.Comparator)8 UUID (java.util.UUID)8 TimeUnit (java.util.concurrent.TimeUnit)7