Examples of WeightedMessage


Examples of hudson.plugins.scm_sync_configuration.model.WeightedMessage

    ScmSyncConfigurationPlugin plugin = ScmSyncConfigurationPlugin.getInstance();
        if(plugin != null){
            ScmSyncStrategy strategy = plugin.getStrategyForSaveable(item, null);

            if(strategy != null){
                WeightedMessage message = strategy.getCommitMessageFactory().getMessageWhenItemDeleted(item);
                plugin.getTransaction().defineCommitMessage(message);
                String path = JenkinsFilesHelper.buildPathRelativeToHudsonRoot(item.getRootDir());
                plugin.getTransaction().registerPathForDeletion(path);
            }
        }
View Full Code Here

Examples of hudson.plugins.scm_sync_configuration.model.WeightedMessage

                File oldDir = new File( parentDir.getAbsolutePath()+File.separator+oldName );
                File newDir = new File( parentDir.getAbsolutePath()+File.separator+newName );

                String oldPath = JenkinsFilesHelper.buildPathRelativeToHudsonRoot(oldDir);
                String newPath = JenkinsFilesHelper.buildPathRelativeToHudsonRoot(newDir);
                WeightedMessage message = strategy.getCommitMessageFactory().getMessageWhenItemRenamed(item, oldPath, newPath);
                plugin.getTransaction().defineCommitMessage(message);
                plugin.getTransaction().registerRenamedPath(oldPath, newPath);
            }
        }
  }
View Full Code Here

Examples of hudson.plugins.scm_sync_configuration.model.WeightedMessage

    ScmSyncConfigurationPlugin plugin = ScmSyncConfigurationPlugin.getInstance();
        if(plugin != null){
            ScmSyncStrategy strategy = plugin.getStrategyForSaveable(o, file.getFile());

            if(strategy != null){
                WeightedMessage message = strategy.getCommitMessageFactory().getMessageWhenSaveableUpdated(o, file);
                plugin.getTransaction().defineCommitMessage(message);
                String path = JenkinsFilesHelper.buildPathRelativeToHudsonRoot(file.getFile());
                plugin.getTransaction().registerPath(path);
            }
        }
View Full Code Here

Examples of hudson.plugins.scm_sync_configuration.model.WeightedMessage

        }
    };

    protected static class DefaultCommitMessageFactory implements CommitMessageFactory {
        public WeightedMessage getMessageWhenSaveableUpdated(Saveable s, XmlFile file) {
            return new WeightedMessage("Modification on configuration(s)", MessageWeight.MINIMAL);
        }
View Full Code Here

Examples of hudson.plugins.scm_sync_configuration.model.WeightedMessage

    protected static class DefaultCommitMessageFactory implements CommitMessageFactory {
        public WeightedMessage getMessageWhenSaveableUpdated(Saveable s, XmlFile file) {
            return new WeightedMessage("Modification on configuration(s)", MessageWeight.MINIMAL);
        }
        public WeightedMessage getMessageWhenItemRenamed(Item item, String oldPath, String newPath) {
            return new WeightedMessage("Item renamed", MessageWeight.MINIMAL);
        }
View Full Code Here

Examples of hudson.plugins.scm_sync_configuration.model.WeightedMessage

        }
        public WeightedMessage getMessageWhenItemRenamed(Item item, String oldPath, String newPath) {
            return new WeightedMessage("Item renamed", MessageWeight.MINIMAL);
        }
        public WeightedMessage getMessageWhenItemDeleted(Item item) {
            return new WeightedMessage("File hierarchy deleted", MessageWeight.MINIMAL);
        }
View Full Code Here

Examples of hudson.plugins.scm_sync_configuration.model.WeightedMessage

  }

    public CommitMessageFactory getCommitMessageFactory(){
        return new CommitMessageFactory(){
            public WeightedMessage getMessageWhenSaveableUpdated(Saveable s, XmlFile file) {
                return new WeightedMessage("Job ["+((Item)s).getName()+"] configuration updated",
                        // Job config update message should be considered as "important", especially
                        // more important than the plugin descriptors Saveable updates
                        MessageWeight.IMPORTANT);
            }
            public WeightedMessage getMessageWhenItemRenamed(Item item, String oldPath, String newPath) {
                return new WeightedMessage("Job ["+item.getName()+"] hierarchy renamed from ["+oldPath+"] to ["+newPath+"]",
                        // Job config rename message should be considered as "important", especially
                        // more important than the plugin descriptors Saveable renames
                        MessageWeight.MORE_IMPORTANT);
            }
            public WeightedMessage getMessageWhenItemDeleted(Item item) {
                return new WeightedMessage("Job ["+item.getName()+"] hierarchy deleted",
                        // Job config deletion message should be considered as "important", especially
                        // more important than the plugin descriptors Saveable deletions
                        MessageWeight.MORE_IMPORTANT);
            }
        };
View Full Code Here

Examples of hudson.plugins.scm_sync_configuration.model.WeightedMessage

  }

    public CommitMessageFactory getCommitMessageFactory(){
        return new CommitMessageFactory(){
            public WeightedMessage getMessageWhenSaveableUpdated(Saveable s, XmlFile file) {
                return new WeightedMessage("User ["+((User)s).getDisplayName()+"] configuration updated",
                        // Job config update message should be considered as "important", especially
                        // more important than the plugin descriptors Saveable updates
                        MessageWeight.IMPORTANT);
            }
            public WeightedMessage getMessageWhenItemRenamed(Item item, String oldPath, String newPath) {
                return new WeightedMessage("User ["+item.getName()+"] configuration renamed from ["+oldPath+"] to ["+newPath+"]",
                        // Job config rename message should be considered as "important", especially
                        // more important than the plugin descriptors Saveable renames
                        MessageWeight.MORE_IMPORTANT);
            }
            public WeightedMessage getMessageWhenItemDeleted(Item item) {
                return new WeightedMessage("User ["+item.getName()+"] hierarchy deleted",
                        // Job config deletion message should be considered as "important", especially
                        // more important than the plugin descriptors Saveable deletions
                        MessageWeight.MORE_IMPORTANT);
            }
        };
View Full Code Here

Examples of hudson.plugins.scm_sync_configuration.model.WeightedMessage

  }

    public CommitMessageFactory getCommitMessageFactory(){
        return new CommitMessageFactory(){
            public WeightedMessage getMessageWhenSaveableUpdated(Saveable s, XmlFile file) {
                return new WeightedMessage("Plugin configuration files updated", MessageWeight.MINIMAL);
            }
            public WeightedMessage getMessageWhenItemRenamed(Item item, String oldPath, String newPath) {
                // It should never happen... but who cares how will behave *every* plugin in the jenkins land ?
                return new WeightedMessage("Plugin configuration files renamed", MessageWeight.MINIMAL);
            }
            public WeightedMessage getMessageWhenItemDeleted(Item item) {
                // It should never happen... but who cares how will behave *every* plugin in the jenkins land ?
                return new WeightedMessage("Plugin configuration files deleted", MessageWeight.MINIMAL);
            }
        };
    }
View Full Code Here

Examples of hudson.plugins.scm_sync_configuration.model.WeightedMessage

  }

    public CommitMessageFactory getCommitMessageFactory(){
        return new CommitMessageFactory(){
            public WeightedMessage getMessageWhenSaveableUpdated(Saveable s, XmlFile file) {
                return new WeightedMessage("Jenkins configuration files updated",
                        // Jenkins config update message should be considered as "important", especially
                        // more important than the plugin descriptors Saveable updates
                        MessageWeight.NORMAL);
            }
            public WeightedMessage getMessageWhenItemRenamed(Item item, String oldPath, String newPath) {
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.