congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ArtifactContent.getFilename
Code IndexAdd Tabnine to your IDE (free)

How to use
getFilename
method
in
org.artificer.common.ArtifactContent

Best Java code snippets using org.artificer.common.ArtifactContent.getFilename (Showing top 7 results out of 315)

origin: org.artificer/artificer-integration

  @Override
  public boolean allowExpansionFromArchive(ArtifactContent content, ArchiveContext archiveContext) {
    if (
        // core
        content.getFilename().endsWith(".xsd") || content.getFilename().endsWith(".wsdl") || content.getFilename().endsWith(".wspolicy")
        // Maven Facade support
        || content.getFilename().endsWith(".sha1") || content.getFilename().endsWith(".pom")) {
      return true;
    }
    if (content.getFilename().endsWith(".xml") && !content.getFilename().equals("pom.xml")) {
      // XML files, but not POMs
      return true;
    }
    return false;
  }
}
origin: org.artificer/artificer-integration

@Override
public boolean isArchive(ArtifactContent content) {
  String filename = content.getFilename();
  return filename.endsWith(".jar") || filename.endsWith(".ear") || filename.endsWith(".war")
      || filename.endsWith(".zip");
}
origin: org.artificer/artificer-integration-kie

@Override
public ArtifactType detect(ArtifactContent content) {
  if (content.getFilename().equals("kmodule.xml")) {
    return ArtifactType.valueOf(KieJarModel.KieXmlDocument, true);
  }
  if (content.getFilename().endsWith(".bpmn") || content.getFilename().endsWith(".bpmn2")) {
    return ArtifactType.valueOf(KieJarModel.BpmnDocument, true);
  }
  if (content.getFilename().endsWith(".drl")) {
    return ArtifactType.valueOf(KieJarModel.DroolsDocument, true);
  }
  return null;
}
origin: org.artificer/artificer-integration-rtgov

@Override
public ArtifactType detect(ArtifactContent content) {
  return RTGovModel.detect(content.getFilename());
}
origin: org.artificer/artificer-integration-kie

@Override
public boolean allowExpansionFromArchive(ArtifactContent content, ArchiveContext archiveContext) {
  if (archiveContext.isExtendedTypeArchive(KieJarModel.TYPE_ARCHIVE)) {
    String filename = content.getFilename();
    if (filename.endsWith(".bpmn") || filename.endsWith(".bpmn2") || filename.endsWith(".drl")) {
      return true;
    }
  }
  return super.allowExpansionFromArchive(content, archiveContext);
}
origin: org.artificer/artificer-integration

@Override
public ArtifactType detect(ArtifactContent content, ArchiveContext archiveContext) {
  if (archiveContext.isExpandedFromArchive()) {
    return detect(content);
  }
  if (content.getFilename().endsWith(".zip")) {
    return ArtifactType.valueOf("ZipArchive", true);
  }
  return null;
}
origin: org.artificer/artificer-integration

@Override
public ArtifactType detect(ArtifactContent content) {
  String filename = content.getFilename().toLowerCase();
  if (filename.endsWith(".xml")) {
    return ArtifactType.XmlDocument();
  } else if (filename.endsWith(".wsdl")) {
    return ArtifactType.WsdlDocument();
  } else if (filename.endsWith(".xsd")) {
    return ArtifactType.XsdDocument();
  } else if (filename.endsWith(".wspolicy")) {
    return ArtifactType.PolicyDocument();
  } else if (!isArchive(content)) {
    // Don't allow archives within archives to become documents!  Only process if explicitly OK'd by another
    // detector (JavaArtifactTypeDetector, etc.).
    return ArtifactType.Document();
  } else {
    return null;
  }
}
org.artificer.commonArtifactContentgetFilename

Javadoc

Obtain the artifact's filename.

Popular methods of ArtifactContent

  • getInputStream
    Obtain this artifact's InputStream, created on-demand.
  • getFile
    Obtain a reference to the artifact's temporary File on the filesystem.
  • getSize

Popular in Java

  • Making http requests using okhttp
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • setRequestProperty (URLConnection)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now