Examples of NewFolderEvent


Examples of com.ettrema.event.NewFolderEvent

    public String processForm( Map<String, String> parameters, Map<String, FileItem> files ) throws BadRequestException, NotAuthorizedException {
        try {
            CollectionResource col = wrapped.createCollection( parameters.get( "name" ) );
            if( eventManager != null ) {
                eventManager.fireEvent( new NewFolderEvent( col ) );
            }
            return null;
        } catch( ConflictException ex ) {
            throw new BadRequestException( wrapped, "A conflict occured. The folder might already exist" );
        }
View Full Code Here

Examples of com.ettrema.event.NewFolderEvent

        CollectionResource made = creator.createResource(existingCol, newName, request);
        if (made == null) {
            log.warn("createCollection returned null. In resource class: " + existingCol.getClass());
            response.setStatus(Response.Status.SC_METHOD_NOT_ALLOWED);
        } else {
            manager.getEventManager().fireEvent(new NewFolderEvent(resource));
            response.setStatus(Response.Status.SC_CREATED);
        }
    }
View Full Code Here

Examples of com.ettrema.event.NewFolderEvent

        if( r == null ) {
            if( parent instanceof MakeCollectionableResource ) {
                MakeCollectionableResource mkcol = (MakeCollectionableResource) parent;
                log.debug( "autocreating new folder: " + path.getName() );
                CollectionResource newCol = mkcol.createCollection( path.getName() );
                manager.getEventManager().fireEvent( new NewFolderEvent( newCol ) );
                return newCol;
            } else {
                log.debug( "parent folder isnt a MakeCollectionableResource: " + parent.getName() );
                return null;
            }
View Full Code Here

Examples of com.ettrema.event.NewFolderEvent

    }

    protected CollectionResource doCreate(MakeCollectionableResource parent, String newName ) throws ConflictException, NotAuthorizedException, BadRequestException {
        CollectionResource col = parent.createCollection( newName );
        if( eventManager != null ) {
            eventManager.fireEvent( new NewFolderEvent( col));
        }
        return col;
    }
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.