Package org.uberfire.java.nio.base.options

Examples of org.uberfire.java.nio.base.options.CommentedOption


    }

    private CommentedOption makeCommentedOption( final String commitMessage ) {
        final String name = identity.getName();
        final Date when = new Date();
        final CommentedOption co = new CommentedOption( sessionInfo.getId(),
                                                        name,
                                                        null,
                                                        commitMessage,
                                                        when );
        return co;
View Full Code Here


    }

    private CommentedOption makeCommentedOption( final String commitMessage ) {
        final String name = identity.getName();
        final Date when = new Date();
        final CommentedOption co = new CommentedOption( sessionInfo.getId(),
                                                        name,
                                                        null,
                                                        commitMessage,
                                                        when );
        return co;
View Full Code Here

    private CommentedOption makeCommentedOption( final String sessionId,
                                                 final String commitMessage ) {
        final String name = identity.getName();
        final Date when = new Date();
        final CommentedOption co = new CommentedOption( sessionId,
                                                        name,
                                                        null,
                                                        commitMessage,
                                                        when );
        return co;
View Full Code Here

    }

    private CommentedOption makeCommentedOption( final String commitMessage ) {
        final String name = identity.getName();
        final Date when = new Date();
        return new CommentedOption( sessionInfo.getId(),
                                    name,
                                    null,
                                    commitMessage,
                                    when );
    }
View Full Code Here

        try {
            final org.uberfire.java.nio.file.Path path = Paths.convert( _path );

            final org.uberfire.java.nio.file.Path target = path.getFileSystem().getPath( path.toString() );

            return Paths.convert( ioService.copy( path, target, REPLACE_EXISTING, new CommentedOption( getSessionInfo().getId(), identity.getName(), null, comment ) ) );

        } catch ( Exception e ) {
            throw ExceptionUtilities.handleException( e );
        }
    }
View Full Code Here

    }

    private CommentedOption makeCommentedOption( final String commitMessage ) {
        final String name = identity.getName();
        final Date when = new Date();
        final CommentedOption co = new CommentedOption( sessionInfo.getId(),
                                                        name,
                                                        null,
                                                        commitMessage,
                                                        when );
        return co;
View Full Code Here

            comment = "revert history from commit {" + record.comment() + "}";
        } else {
            comment = _comment;
        }

        ioService.move( history, convert( path ), REPLACE_EXISTING, new CommentedOption( sessionInfo.getId(), sessionInfo.getIdentity().getName(), null, comment ) );

        return new ArrayList<VersionRecord>( repositoryService.getRepositoryInfo( alias ).getInitialVersionList() );
    }
View Full Code Here

        // avoid duplicated writes to not cause cyclic cluster sync
        if ( ioService.exists( filePath ) ) {
            return true;
        }

        final CommentedOption commentedOption = new CommentedOption( getIdentityName(),
                                                                     "Created config " + filePath.getFileName() );
        try {
            ioService.startBatch( new FileSystem[]{filePath.getFileSystem()} );
            ioService.write( filePath, marshaller.marshall( configGroup ), commentedOption );
View Full Code Here

    public boolean updateConfiguration( ConfigGroup configGroup ) {
        String filename = configGroup.getName().replaceAll( INVALID_FILENAME_CHARS, "_" );

        final Path filePath = ioService.get( systemRepository.getUri() ).resolve( filename + configGroup.getType().getExt() );

        final CommentedOption commentedOption = new CommentedOption( getIdentityName(),
                                                                     "Updated config " + filePath.getFileName() );
        try {
            ioService.startBatch( new FileSystem[]{filePath.getFileSystem()} );
            ioService.write( filePath, marshaller.marshall( configGroup ), commentedOption );
View Full Code Here

        return ioService.getLastModifiedTime( lastModifiedPath ).toMillis();
    }

    protected void updateLastModified() {
        final Path lastModifiedPath = ioService.get( systemRepository.getUri() ).resolve( LAST_MODIFIED_MARKER_FILE );
        final CommentedOption commentedOption = new CommentedOption( "system", "system repo updated" );

        ioService.write( lastModifiedPath, new Date().toString().getBytes(), commentedOption );

        // update the last value to avoid to be retriggered byt the monitor
        localLastModifiedValue.set( getLastModified() );
View Full Code Here

TOP

Related Classes of org.uberfire.java.nio.base.options.CommentedOption

Copyright © 2018 www.massapicom. 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.