Examples of FileType


Examples of org.apache.archiva.configuration.FileType

        return value;
    }
   
    private FileType readFileType( String prefix, Registry registry )
    {
        FileType value = new FileType();

        String id = registry.getString( prefix + "id", value.getId() );
        value.setId( id );
        java.util.List patterns = new java.util.ArrayList/*<String>*/();
        patterns.addAll( registry.getList( prefix + "patterns.pattern" ) );
        value.setPatterns( patterns );

        return value;
    }
View Full Code Here

Examples of org.apache.archiva.configuration.FileType

                int count = 0;
                for ( Iterator iter = value.getFileTypes().iterator(); iter.hasNext(); count++ )
                {
                    String name = "fileTypes.fileType(" + count + ")";
                    FileType o = ( FileType ) iter.next();
                    writeFileType( prefix + name + ".", o, registry );
                }
            }
            if ( value.getKnownContentConsumers() != null && value.getKnownContentConsumers().size() > 0
)
View Full Code Here

Examples of org.apache.archiva.configuration.FileType

    @Override
    public void execute( Object input )
    {
        if ( input instanceof FileType )
        {
            FileType filetype = (FileType) input;
            map.put( filetype.getId(), filetype );
        }
    }
View Full Code Here

Examples of org.apache.commons.vfs.FileType

    /**
     * Adds a child to this file.
     */
    public void attachChild(final FileName baseName, final FileType type) throws Exception
    {
        final FileType oldType = doGetType();
        if (children.add(baseName))
        {
            childrenChanged(baseName, type);
        }
        maybeTypeChanged(oldType);
View Full Code Here

Examples of org.apache.commons.vfs.FileType

    /**
     * Attaches or detaches the target file.
     */
    public void setFile(final FileObject file) throws Exception
    {
        final FileType oldType = doGetType();

        if (file != null)
        {
            file.getFileSystem().addListener(file, this);
        }
View Full Code Here

Examples of org.apache.commons.vfs.FileType

     * Checks whether the file's type has changed, and fires the appropriate
     * events.
     */
    private void maybeTypeChanged(final FileType oldType) throws Exception
    {
        final FileType newType = doGetType();
        if (oldType == FileType.IMAGINARY && newType != FileType.IMAGINARY)
        {
            handleCreate(newType);
        }
        else if (oldType != FileType.IMAGINARY && newType == FileType.IMAGINARY)
View Full Code Here

Examples of org.apache.commons.vfs.FileType

        String queryString = UriParser.extractQueryString(name);

        // Decode and normalise the file name
        UriParser.canonicalizePath(name, 0, name.length(), this);
        UriParser.fixSeparators(name);
        FileType fileType = UriParser.normalisePath(name);
        final String path = name.toString();

        return new URLFileName(
            auth.scheme,
            auth.hostName,
View Full Code Here

Examples of org.apache.commons.vfs.FileType

   @see #fixSeparators
   */
  public static FileType normalisePath(final StringBuffer path)
      throws FileSystemException
  {
    FileType fileType = FileType.FOLDER;
    if (path.length() == 0)
    {
      return fileType;
    }

View Full Code Here

Examples of org.apache.commons.vfs.FileType

     * Returns the size of the content (in bytes).
     */
    public long getSize() throws FileSystemException
    {
        // Do some checking
        FileType fileType = file == null ? null : file.getType();
        if (fileType == null || !fileType.hasContent())
        {
            throw new FileSystemException("vfs.provider/get-size-not-file.error", file);
        }
        /*
        if (getThreadData().getState() == STATE_WRITING || getThreadData().getState() == STATE_RANDOM_ACCESS)
View Full Code Here

Examples of org.apache.commons.vfs.FileType

        if (getThreadData().getState() == STATE_WRITING || getThreadData().getState() == STATE_RANDOM_ACCESS)
        {
            throw new FileSystemException("vfs.provider/get-last-modified-writing.error", file);
        }
        */
        FileType fileType = file.getType();
        if (fileType == null || !file.getType().hasAttributes())
        {
            throw new FileSystemException("vfs.provider/get-last-modified-no-exist.error", file);
        }
        try
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.