Tabnine Logo
ConfigFileInfo.getFinalname
Code IndexAdd Tabnine to your IDE (free)

How to use
getFinalname
method
in
org.apache.karaf.features.ConfigFileInfo

Best Java code snippets using org.apache.karaf.features.ConfigFileInfo.getFinalname (Showing top 8 results out of 315)

origin: org.opendaylight.controller/config-persister-feature-adapter

protected Optional<FeatureConfigSnapshotHolder> getFeatureConfigSnapshotHolder(final ConfigFileInfo c) {
  try {
    return Optional.of(new FeatureConfigSnapshotHolder(c, this));
  } catch (final JAXBException e) {
    LOG.warn("Unable to parse configuration snapshot. Config from '{}' will be IGNORED. " +
        "Note that subsequent config files may fail due to this problem. " +
        "Xml markup in this file needs to be fixed, for detailed information see enclosed exception.",
        c.getFinalname(), e);
  } catch (final XMLStreamException e) {
    // Files that cannot be loaded are ignored as non config subsystem files e.g. jetty.xml
    LOG.debug("Unable to read configuration file '{}'. Not a configuration snapshot",
        c.getFinalname(), e);
  }
  return Optional.absent();
}
origin: apache/karaf

private void displayConfigFileInformation(Feature feature, String contentType) {
  List<ConfigFileInfo> configurationFiles = feature.getConfigurationFiles();
  if (configurationFiles.isEmpty()) {
    System.out.println(contentType + " has no configuration files");
  } else {
    System.out.println(contentType + " configuration files: ");
    for (ConfigFileInfo configFileInfo : configurationFiles) {
      System.out.println(INDENT + configFileInfo.getFinalname());
    }
  }        
}
origin: org.apache.karaf.features/org.apache.karaf.features.command

private void displayConfigFileInformation(Feature feature, String contentType) {
  List<ConfigFileInfo> configurationFiles = feature.getConfigurationFiles();
  if (configurationFiles.isEmpty()) {
    System.out.println(contentType + " has no configuration files");
  } else {
    System.out.println(contentType + " configuration files: ");
    for (ConfigFileInfo configFileInfo : configurationFiles) {
      System.out.println(INDENT + configFileInfo.getFinalname());
    }
  }        
}
origin: org.opendaylight.controller/config-persister-feature-adapter

public FeatureConfigSnapshotHolder(final ConfigFileInfo fileInfo, final Feature feature) throws JAXBException, XMLStreamException {
  Preconditions.checkNotNull(fileInfo);
  Preconditions.checkNotNull(fileInfo.getFinalname());
  Preconditions.checkNotNull(feature);
  this.fileInfo = fileInfo;
  this.featureChain.add(feature);
  // TODO extract utility method for umarshalling config snapshots
  JAXBContext jaxbContext = JAXBContext.newInstance(ConfigSnapshot.class);
  Unmarshaller um = jaxbContext.createUnmarshaller();
  XMLInputFactory xif = XMLInputFactory.newFactory();
  xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
  xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
  XMLStreamReader xsr = xif.createXMLStreamReader(new StreamSource(new File(fileInfo.getFinalname())));
  unmarshalled = ((ConfigSnapshot) um.unmarshal(xsr));
}
/*
origin: org.opendaylight.controller/config-persister-feature-adapter

@Override
public String toString() {
  StringBuilder b = new StringBuilder();
  Path p = Paths.get(fileInfo.getFinalname());
  b.append(p.getFileName())
    .append("(")
    .append(getCauseFeature())
    .append(",")
    .append(getFeature())
    .append(")");
  return b.toString();
}
origin: apache/karaf

static TabularData getConfigFileList(List<ConfigFileInfo> configFiles) throws OpenDataException {
  TabularDataSupport table = new TabularDataSupport(FEATURE_CONFIG_FILES_TABLE);
  for (ConfigFileInfo configFile : configFiles) {
    String[] itemNames = FeaturesServiceMBean.FEATURE_CONFIG_FILES;
    Object[] itemValues = {configFile.getFinalname()};
    CompositeData config = new CompositeDataSupport(FEATURE_CONFIG_FILES, itemNames, itemValues);
    table.put(config);
  }
  return table;
}
origin: org.opendaylight.controller/config-persister-feature-adapter

public LinkedHashSet<FeatureConfigSnapshotHolder> getFeatureConfigSnapshotHolders() throws Exception {
  final LinkedHashSet <FeatureConfigSnapshotHolder> snapShotHolders = new LinkedHashSet<>();
  for(final ConfigFileInfo c: getConfigurationFiles()) {
    // Skip non config snapshot XML files
    if(isConfigSnapshot(c.getFinalname())) {
      final Optional<FeatureConfigSnapshotHolder> featureConfigSnapshotHolder = getFeatureConfigSnapshotHolder(c);
      if(featureConfigSnapshotHolder.isPresent()) {
        snapShotHolders.add(featureConfigSnapshotHolder.get());
      }
    }
  }
  return snapShotHolders;
}
origin: apache/karaf

installConfigurationFile(configFile.getLocation(), configFile.getFinalname(),
             configFile.isOverride());
org.apache.karaf.featuresConfigFileInfogetFinalname

Popular methods of ConfigFileInfo

  • getLocation
  • isOverride

Popular in Java

  • Making http requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • runOnUiThread (Activity)
  • onCreateOptionsMenu (Activity)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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