Example #1
0
  public void setBaseUrls(ServerSiteUrlConfig siteUrl, ServerSiteUrlConfig secureSiteUrl) {
    CruiseConfig config = loadForEdit();

    config.setServerConfig(
        new ServerConfig(
            config.server().security(), config.server().mailHost(), siteUrl, secureSiteUrl));
    writeConfigFile(config);
  }
Example #2
0
 public void addAdminRoles(String... roleNames) {
   CruiseConfig cruiseConfig = loadForEdit();
   AdminsConfig adminsConfig = cruiseConfig.server().security().adminsConfig();
   for (String roleName : roleNames) {
     adminsConfig.add(new AdminRole(new CaseInsensitiveString(roleName)));
   }
   writeConfigFile(cruiseConfig);
 }
Example #3
0
 public void setupMailHost() {
   CruiseConfig config = loadForEdit();
   config
       .server()
       .setMailHost(
           new MailHost(
               "10.18.3.171",
               25,
               "cruise2",
               "password",
               true,
               false,
               "*****@*****.**",
               "*****@*****.**"));
   writeConfigFile(config);
 }
Example #4
0
 public boolean isSecurityEnabled() {
   CruiseConfig cruiseConfig = loadForEdit();
   return cruiseConfig.server().isSecurityEnabled();
 }
Example #5
0
 public void addRole(Role role) {
   CruiseConfig config = loadForEdit();
   config.server().security().addRole(role);
   writeConfigFile(config);
 }
Example #6
0
 public void addMailHost(MailHost mailHost) {
   CruiseConfig config = loadForEdit();
   config.server().updateMailHost(mailHost);
   writeConfigFile(config);
 }
Example #7
0
 public void addSecurity(SecurityConfig securityConfig) {
   CruiseConfig config = loadForEdit();
   config.server().useSecurity(securityConfig);
   writeConfigFile(config);
 }
Example #8
0
 public void updateArtifactRoot(String path) {
   CruiseConfig cruiseConfig = loadForEdit();
   cruiseConfig.server().updateArtifactRoot(path);
   writeConfigFile(cruiseConfig);
 }
Example #9
0
 public void setArtifactsDir(String artifactsDir) {
   CruiseConfig cruiseConfig = loadForEdit();
   cruiseConfig.server().setArtifactsDir(artifactsDir);
   writeConfigFile(cruiseConfig);
 }