Examples of FileLocator


Examples of com.mycila.testing.plugins.jetty.locator.FileLocator

     * @see com.mycila.testing.plugins.jetty.config.Config#getWarLocationUrl()
     */
    public URL getWarLocationUrl()
    {
        try {
            final FileLocator fileLocator = new StrategyFileLocator();
            final File file = get(fileLocator.locate(this.warLocation), 0);
            final URL url = file.toURI().toURL();
           
            return url;
        }
        catch (final FileNotFoundException e) {
View Full Code Here

Examples of com.mycila.testing.plugins.jetty.locator.FileLocator

    @Test
    public final void testLocate()
        throws Exception
    {
        final FileLocator locator = mock(FileLocator.class);

        new FixedPathFileLocator(locator, "file").locate("any");

        verify(locator).locate("file");
    }
View Full Code Here

Examples of com.mycila.testing.plugins.jetty.locator.FileLocator

     * @see com.mycila.testing.plugins.jetty.config.Config#getWarLocationUrl()
     */
    public URL getWarLocationUrl()
    {
        try {
            final FileLocator fileLocator = new StrategyFileLocator();
            final File file = get(fileLocator.locate(this.warLocation), 0);
            final URL url = file.toURI().toURL();
           
            return url;
        }
        catch (final FileNotFoundException e) {
View Full Code Here

Examples of com.objfac.prebop.FileLocator

      if (t != null) {
        msg = "preprocessor unexpected error: "+t.toString();
      }
      else {
        msg = e.getMessage();
        FileLocator locator = e.getLocator();
        if (locator != null) {
          msg += " at line "+locator.getLineNumber()+" in file "+locator.getFileName();
        }
      }
      throw new BuildException(msg);
    }
  }
View Full Code Here

Examples of de.intarsys.tools.locator.FileLocator

   * @throws COSLoadException
   */
  @SuppressWarnings("unchecked")
  private PDDocument openDoc(File inputFile, String password) throws IOException, COSLoadException {
    PDDocument retVal = null;
    FileLocator locator = new FileLocator(inputFile);
    if (password != null) {
      Map options = new HashMap();
      final char[] pwd = password.toCharArray();
      PasswordProvider.setPasswordProvider(options, new IPasswordProvider() {
        public char[] getPassword() {
View Full Code Here

Examples of org.apache.commons.configuration.io.FileLocator

     * @param name the file name
     * @return the URL pointing to the file
     */
    private static URL locate(FileSystem fs, String basePath, String name)
    {
        FileLocator locator =
                FileLocatorUtils.fileLocator().fileSystem(fs)
                        .basePath(basePath).fileName(name).create();
        return FileLocatorUtils.locate(locator);
    }
View Full Code Here

Examples of org.apache.commons.configuration.io.FileLocator

     * @return the URL of the include file or <b>null</b> if it cannot be
     *         resolved
     */
    private URL locateIncludeFile(String basePath, String fileName)
    {
        FileLocator includeLocator =
                FileLocatorUtils.fileLocator(locator).sourceURL(null)
                        .basePath(basePath).fileName(fileName).create();
        return FileLocatorUtils.locate(includeLocator);
    }
View Full Code Here

Examples of org.apache.commons.configuration2.io.FileLocator

     * @return the URL of the include file or <b>null</b> if it cannot be
     *         resolved
     */
    private URL locateIncludeFile(String basePath, String fileName)
    {
        FileLocator includeLocator =
                FileLocatorUtils.fileLocator(locator).sourceURL(null)
                        .basePath(basePath).fileName(fileName).create();
        return FileLocatorUtils.locate(includeLocator);
    }
View Full Code Here

Examples of org.apache.commons.configuration2.io.FileLocator

     * @param name the file name
     * @return the URL pointing to the file
     */
    private static URL locate(FileSystem fs, String basePath, String name)
    {
        FileLocator locator =
                FileLocatorUtils.fileLocator().fileSystem(fs)
                        .basePath(basePath).fileName(name).create();
        return FileLocatorUtils.locate(locator);
    }
View Full Code Here

Examples of org.apache.commons.configuration2.io.FileLocator

                new FileBasedConfigurationBuilder<PropertiesConfiguration>(
                        PropertiesConfiguration.class)
                        .configure(new FileBasedBuilderParametersImpl()
                                .setFile(file));
        builder.getConfiguration();
        FileLocator locator = builder.getFileHandler().getFileLocator();
        assertTrue("Not fully defined: " + locator,
                FileLocatorUtils.isFullyInitialized(locator));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.