Examples of ProjectConfig


Examples of com.denimgroup.threadfix.framework.engine.ProjectConfig

   
    File[] rootFiles = { null, new File(TestConstants.BODGEIT_SOURCE_LOCATION) };

    for (File file : rootFiles) {
      for (SourceCodeAccessLevel accessLevel : SourceCodeAccessLevel.values()) {
        ProjectConfig config = new ProjectConfig(FrameworkType.JSP, accessLevel, file, null);
                JSPDataFlowParser parser = new JSPDataFlowParser(config);
        assertTrue("Parameter was not null and should have been.",
            parser.parse(EndpointQueryBuilder.start().generateQuery()) == null);
        assertTrue("Parameter was not null and should have been.",
            parser.parse(emptyDataFlowFinding) == null);
View Full Code Here

Examples of com.eviware.soapui.config.ProjectConfig

    removeUnusedEndpoints();
  }

  private void initConfig()
  {
    ProjectConfig projectConfig = this.project.getConfig();

    if( !projectConfig.isSetEndpointStrategy() )
    {
      projectConfig.addNewEndpointStrategy();
    }

    config = ( DefaultEndpointStrategyConfig )projectConfig.getEndpointStrategy().changeType(
        DefaultEndpointStrategyConfig.type );

    for( EndpointConfig endpointConfig : config.getEndpointList() )
    {
      if( !endpointConfig.isSetMode() )
View Full Code Here

Examples of com.eviware.soapui.config.ProjectConfig

        }

        removeProjectRoot(projectDocument);

        if (hasBeenSuccessfullyDecrypted(projectDocument) && hasEncryptionPassword()) {
            ProjectConfig encryptedProjectConfig = encrypt(projectDocument);
            projectDocument.setSoapuiProject(encryptedProjectConfig);
        }

        XmlOptions options = new XmlOptions();
        if (SoapUI.getSettings().getBoolean(WsdlSettings.PRETTY_PRINT_PROJECT_FILES)) {
View Full Code Here

Examples of com.eviware.soapui.config.ProjectConfig

            // we have password so do encryption
            try {
                String data = getConfig().xmlText();
                String encryptionAlgorithm = "des3";
                byte[] encrypted = OpenSSL.encrypt(encryptionAlgorithm, passwordForEncryption.toCharArray(), data.getBytes());
                ProjectConfig newProjectConfig = ProjectConfig.Factory.newInstance();
                ProjectConfig soapuiProject = projectDocument.getSoapuiProject();
                newProjectConfig.setName(soapuiProject.getName());
                newProjectConfig.setEncryptedContent(encrypted);
                newProjectConfig.setEncryptedContentAlgorithm(encryptionAlgorithm);
                return newProjectConfig;
            } catch (GeneralSecurityException e) {
                UISupport.showErrorMessage("Encryption Error");
View Full Code Here

Examples of com.eviware.soapui.config.ProjectConfig

        removeUnusedEndpoints();
    }

    private void initConfig() {
        ProjectConfig projectConfig = this.project.getConfig();

        if (!projectConfig.isSetEndpointStrategy()) {
            projectConfig.addNewEndpointStrategy();
        }

        config = (DefaultEndpointStrategyConfig) projectConfig.getEndpointStrategy().changeType(
                DefaultEndpointStrategyConfig.type);

        for (EndpointConfig endpointConfig : config.getEndpointList()) {
            if (!endpointConfig.isSetMode()) {
                endpointConfig.setMode(EndpointConfig.Mode.COMPLEMENT);
View Full Code Here

Examples of com.google.code.lightssh.project.config.ProjectConfig

  /**
   * CAS启动设置keystore
   */
  public void initSystemProperty( ){
    try{
      ProjectConfig systemConfig = (ProjectConfig)
        SpringContextHelper.getBean("systemConfig");
     
      if( systemConfig != null && "true".equalsIgnoreCase(
            systemConfig.getProperty( ConfigConstants.CAS_ENABLED_KEY, "false")) ){
        String keystore = systemConfig.getProperty(ConfigConstants.CAS_SERVER_KEYSTORE_KEY);
       
        log.info("设置系统属性javax.net.ssl.trustStore:[{}]",keystore);
        System.setProperty("javax.net.ssl.trustStore",keystore);
      }
    }catch( Exception e ){
View Full Code Here

Examples of com.google.gerrit.server.git.ProjectConfig

      MetaDataUpdate md =
          new MetaDataUpdate(GitReferenceUpdated.DISABLED, allProjects, git);
      md.getCommitBuilder().setAuthor(serverUser);
      md.getCommitBuilder().setCommitter(serverUser);

      ProjectConfig config = ProjectConfig.read(md);
      AccessSection section =
          config.getAccessSection(AccessSection.GLOBAL_CAPABILITIES, true);
      Permission capability =
          section.getPermission(GlobalCapability.EMAIL_REVIEWERS, true);
      for (GroupReference group : groups) {
        capability.getRule(config.resolve(group), true).setDeny();
      }

      md.setMessage("Upgrade to Gerrit Code Review schema 64\n");
      config.commit(md);
    } catch (IOException e) {
      throw new OrmException(e);
    } catch (ConfigInvalidException e) {
      throw new OrmException(e);
    } finally {
View Full Code Here

Examples of com.google.gerrit.server.git.ProjectConfig

      throw new OrmException(e);
    }
    try {
      MetaDataUpdate md =
          new MetaDataUpdate(GitReferenceUpdated.DISABLED, allProjects, git);
      ProjectConfig config = ProjectConfig.read(md);
      Map<Integer, ContributorAgreement> agreements = getAgreementToAdd(db, config);
      if (agreements.isEmpty()) {
        return;
      }
      ui.message("Moved contributor agreements to project.config");

      // Create the auto verify groups.
      List<AccountGroup.UUID> adminGroupUUIDs = getAdministrateServerGroups(db, config);
      for (ContributorAgreement agreement : agreements.values()) {
        if (agreement.getAutoVerify() != null) {
          getOrCreateGroupForIndividuals(db, config, adminGroupUUIDs, agreement);
        }
      }

      // Scan AccountAgreement
      long minTime = addAccountAgreements(db, config, adminGroupUUIDs, agreements);

      ProjectConfig base = ProjectConfig.read(md, null);
      for (ContributorAgreement agreement : agreements.values()) {
        base.replace(agreement);
      }
      base.getAccountsSection().setSameGroupVisibility(
          config.getAccountsSection().getSameGroupVisibility());

      BatchMetaDataUpdate batch = base.openUpdate(md);
      try {
        // Scan AccountGroupAgreement
        List<AccountGroupAgreement> groupAgreements =
            getAccountGroupAgreements(db, agreements);

        // Find the earliest change
        for (AccountGroupAgreement aga : groupAgreements) {
          minTime = Math.min(minTime, aga.getTime());
        }
        minTime -= 60 * 1000; // 1 Minute

        CommitBuilder commit = new CommitBuilder();
        commit.setAuthor(new PersonIdent(serverUser, new Date(minTime)));
        commit.setCommitter(new PersonIdent(serverUser, new Date(minTime)));
        commit.setMessage("Add the ContributorAgreements for upgrade to Gerrit Code Review schema 65\n");
        batch.write(commit);

        for (AccountGroupAgreement aga : groupAgreements) {
          AccountGroup group = db.accountGroups().get(aga.groupId);
          if (group == null) {
            continue;
          }

          ContributorAgreement agreement = agreements.get(aga.claId);
          agreement.getAccepted().add(new PermissionRule(config.resolve(group)));
          base.replace(agreement);

          PersonIdent ident = null;
          if (aga.reviewedBy != null) {
            Account ua = db.accounts().get(aga.reviewedBy);
            if (ua != null) {
View Full Code Here

Examples of com.google.gerrit.server.git.ProjectConfig

        MetaDataUpdate md =
            new MetaDataUpdate(GitReferenceUpdated.DISABLED, nameKey, git);
        md.getCommitBuilder().setAuthor(serverUser);
        md.getCommitBuilder().setCommitter(serverUser);

        ProjectConfig config = ProjectConfig.read(md);
        loadProject(rs, config.getProject());
        config.getAccessSections().clear();
        convertRights(config);

        // Grant out read on the config branch by default.
        //
        if (config.getProject().getNameKey().equals(systemConfig.wildProjectName)) {
          AccessSection meta = config.getAccessSection(GitRepositoryManager.REF_CONFIG, true);
          Permission read = meta.getPermission(READ, true);
          read.getRule(config.resolve(projectOwners), true);
        }

        md.setMessage("Import project configuration from SQL\n");
        config.commit(md);
      } catch (ConfigInvalidException err) {
        throw new OrmException("Cannot read project " + name, err);
      } catch (IOException err) {
        throw new OrmException("Cannot export project " + name, err);
      } finally {
View Full Code Here

Examples of com.google.gerrit.server.git.ProjectConfig

      MetaDataUpdate md =
          new MetaDataUpdate(GitReferenceUpdated.DISABLED, allProjectsName, git);
      md.getCommitBuilder().setAuthor(serverUser);
      md.getCommitBuilder().setCommitter(serverUser);

      ProjectConfig config = ProjectConfig.read(md);
      Project p = config.getProject();
      p.setDescription("Rights inherited by all other projects");
      p.setUseContributorAgreements(false);

      AccessSection cap = config.getAccessSection(AccessSection.GLOBAL_CAPABILITIES, true);
      AccessSection all = config.getAccessSection(AccessSection.ALL, true);
      AccessSection heads = config.getAccessSection(AccessSection.HEADS, true);
      AccessSection meta = config.getAccessSection(GitRepositoryManager.REF_CONFIG, true);

      cap.getPermission(GlobalCapability.ADMINISTRATE_SERVER, true)
        .add(rule(config, admin));

      PermissionRule review = rule(config, registered);
      review.setRange(-1, 1);
      heads.getPermission(Permission.LABEL + "Code-Review", true).add(review);

      all.getPermission(Permission.READ, true) //
          .add(rule(config, admin));
      all.getPermission(Permission.READ, true) //
          .add(rule(config, anonymous));

      config.getAccessSection("refs/for/" + AccessSection.ALL, true) //
          .getPermission(Permission.PUSH, true) //
          .add(rule(config, registered));
      all.getPermission(Permission.FORGE_AUTHOR, true) //
          .add(rule(config, registered));

      Permission metaReadPermission = meta.getPermission(Permission.READ, true);
      metaReadPermission.setExclusiveGroup(true);
      metaReadPermission.add(rule(config, owners));

      md.setMessage("Initialized Gerrit Code Review " + Version.getVersion());
      config.commit(md);
    } finally {
      git.close();
    }
  }
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.