@Test public void basenameYesPage() { String prefix = "prefix_[BASENAME]"; assertEquals("5_prefix_name.pdf", new PrefixTypesChain(prefix).process(prefix, nameRequest().originalName("name").page(5))); }
public String process(String prefix, NameGenerationRequest request) { LOG.trace("Performing prefix processing with first level prefix chain"); String retVal = processChain(prefix, request, prefixesChanin); if (prefixesChanin.isEmpty()) { retVal = prefixPrepend.process(retVal, request); } if (!ensureUniqueness) { retVal = pageNumberPrepend.process(retVal, request); } return extensionProcessor.process(toSafeFilename(retVal), request); }
PrefixTypesChain { public String process(String prefix, NameGenerationRequest request) { LOG.trace("Performing prefix processing with first level prefix chain"); String retVal = processChain(prefix, request, prefixesChanin); if (prefixesChanin.isEmpty()) { retVal = prefixPrepend.process(retVal, request); } if (!ensureUniqueness) { retVal = pageNumberPrepend.process(retVal, request); } return extensionProcessor.process(toSafeFilename(retVal), request); } }
PrefixTypesChain { public String process(String prefix, NameGenerationRequest request) { LOG.trace("Performing prefix processing with first level prefix chain"); String retVal = processChain(prefix, request, prefixesChanin); if (prefixesChanin.isEmpty()) { retVal = prefixPrepend.process(retVal, request); } if (!ensureUniqueness) { retVal = pageNumberPrepend.process(retVal, request); } return extensionProcessor.process(toSafeFilename(retVal), request); } PrefixTypesChain(String prefix); }
PrefixTypesChain { public String process(String prefix, NameGenerationRequest request) { LOG.trace("Performing prefix processing with first level prefix chain"); String retVal = processChain(prefix, request, prefixesChanin); if (prefixesChanin.isEmpty()) { retVal = prefixPrepend.process(retVal, request); } if (!ensureUniqueness) { retVal = pageNumberPrepend.process(retVal, request); } return extensionProcessor.process(toSafeFilename(retVal), request); } PrefixTypesChain(String prefix); String process(String prefix, NameGenerationRequest request); }
PrefixTypesChain { public String process(String prefix, NameGenerationRequest request) { LOG.trace("Performing prefix processing with first level prefix chain"); String retVal = processChain(prefix, request, prefixesChanin); if (prefixesChanin.isEmpty()) { retVal = prefixPrepend.process(retVal, request); } if (!ensureUniqueness) { retVal = pageNumberPrepend.process(retVal, request); } return extensionProcessor.process(toSafeFilename(retVal), request); } PrefixTypesChain(String prefix); String process(String prefix, NameGenerationRequest request);  }