public void addDir (final String sDir) { m_aDirs.add (sDir); }
public boolean hasRequiredHeaders () { return m_aRequiredHeaders.isNotEmpty (); }
@Nonnull @ReturnsMutableCopy protected final ICommonsOrderedSet <String> getAllDeniedExtensions () { return m_aDeniedExtensions.getClone (); }
@Nonnull public EChange registerLocale (@Nonnull final Locale aLocale) { ValueEnforcer.notNull (aLocale, "Locale"); if (!m_aLocales.add (aLocale)) return EChange.UNCHANGED; if (m_aLocales.size () == 1) { // If it is the first locale, automatically make it the default locale // until further notice! setDefaultLocale (aLocale); } return EChange.CHANGED; }
public static void reInit (@Nullable final ClassLoader aClassLoader) { s_aRWLock.writeLocked ( () -> { // Remove all existing font resources s_aItems.clear (); final ClassLoader aRealClassLoader = aClassLoader != null ? aClassLoader : ClassLoaderHelper.getDefaultClassLoader (); // Load all SPI resources for (final IFontResourceProviderSPI aProvider : ServiceLoaderHelper.getAllSPIImplementations (IFontResourceProviderSPI.class, aRealClassLoader)) { // Register all font resources of the current provider for (final IFontResource aFontResource : aProvider.getAllFontResources ()) if (!s_aItems.add (aFontResource)) LOGGER.warn ("Failed to register font resource " + aFontResource + " because this resource is already contained!"); } if (s_aItems.isEmpty ()) LOGGER.info ("No font resources available for registration!"); else LOGGER.info ("Successfully registered " + s_aItems.size () + " font resources!"); }); }
if (aImportBusinessCards.removeIf (x -> x.getServiceGroup ().equals (aBCSG))) " is already contained in the file. Will overwrite the previous definition."); aImportBusinessCards.add (aBusinessCard); if (bIsBusinessCardContained) aDeleteBusinessCards.add (aBusinessCard); if (aImportServiceGroups.isEmpty () && aImportBusinessCards.isEmpty ())
/** * Specify file valid file extensions here to restrict uploads to specific * types. * * @param aAllowedExtensions * The allowed extensions to be added. * @return this for chaining */ @Nonnull public FineUploader5Validation addAllowedExtensions (@Nullable final Collection <String> aAllowedExtensions) { if (aAllowedExtensions != null) m_aValidationAllowedExtensions.addAll (aAllowedExtensions); return this; }
if (m_aDeniedFilenames.contains (sFilename)) if (m_bDeniedAllExtensions || m_aDeniedExtensions.contains (sUnifiedExt)) if (!m_aDeniedRegExs.isEmpty ()) for (final String sDeniedRegEx : m_aDeniedRegExs) if (RegExHelper.stringMatchesPattern (sDeniedRegEx, sFilename)) if (m_aAllowedFilenames.contains (sFilename)) if (m_bAllowedAllExtensions || m_aAllowedExtensions.contains (sUnifiedExt)) if (!m_aAllowedRegExs.isEmpty ()) for (final String sAllowedRegEx : m_aAllowedRegExs) if (RegExHelper.stringMatchesPattern (sAllowedRegEx, sFilename))
public boolean hasAnyParentType () { return !m_aParentTypes.isEmpty (); }
public boolean containsMedium (@Nullable final ECSSMedium eMedium) { return m_aMedia.contains (eMedium); }
@Nonnegative public int getExpressionCount () { return m_aList.size (); }
if (aImportBusinessCards.removeIf (x -> x.getServiceGroup ().equals (aBCSG))) " is already contained in the file. Will overwrite the previous definition."); aImportBusinessCards.add (aBusinessCard); if (bIsBusinessCardContained) aDeleteBusinessCards.add (aBusinessCard); if (aImportServiceGroups.isEmpty () && aImportBusinessCards.isEmpty ())
/** * Used by the file selection dialog. Restrict the valid file types that * appear in the selection dialog by listing valid content-type specifiers * here. See docs on the accept attribute of the <input> element * * @param aAcceptFiles * The MIME types to be added. * @return this for chaining */ @Nonnull public FineUploader5Validation addAcceptFiles (@Nullable final Collection <? extends IMimeType> aAcceptFiles) { if (aAcceptFiles != null) m_aValidationAcceptFiles.addAll (aAcceptFiles); return this; }
_initialFillSet (m_aDeniedExtensions, aInitParams.get (INITPARAM_DENIED_EXTENSIONS), true); _initialFillSet (m_aDeniedRegExs, aInitParams.get (INITPARAM_DENIED_REG_EXS), false); m_bDeniedAllExtensions = m_aDeniedExtensions.contains (INITPARAM_VALUE_WILDCARD); m_bAllowedAllExtensions = m_aAllowedExtensions.contains (INITPARAM_VALUE_WILDCARD); ". This means that this servlet will not deliver any resource!"); else if (m_aAllowedFilenames.isEmpty () && m_aAllowedExtensions.isEmpty () && m_aAllowedRegExs.isEmpty ()) LOGGER.warn ("No allowance rules are defined in " + getClass ().getName () +
public boolean hasNoMedia () { return m_aMedia.isEmpty (); }
public boolean isSupportedLocale (@Nullable final Locale aLocale) { return m_aLocales.contains (aLocale); }
@Nonnegative public int getMediaCount () { return m_aMedia.size (); }
public void addFile (final String sFile) { m_aFiles.add (sFile); }
@Nonnull @ReturnsMutableCopy protected final ICommonsOrderedSet <String> getAllAllowedExtensions () { return m_aAllowedExtensions.getClone (); }