Package org.apache.stratos.adc.mgt.dao

Examples of org.apache.stratos.adc.mgt.dao.Repository


        cartridge.setClusterDomain(resultSet.getString("CLUSTER_DOMAIN"));
        cartridge.setClusterSubdomain(resultSet.getString("CLUSTER_SUBDOMAIN"));
        cartridge.setProvider(resultSet.getString("PROVIDER"));
        cartridge.setPolicy(resultSet.getString("POLICY"));
        cartridge.setMappedDomain(resultSet.getString("MAPPED_DOMAIN"));
        Repository repo = new Repository();
        repo.setRepoName(resultSet.getString("REPO_NAME"));
        cartridge.setRepository(repo);
        cartridge.setHostName(resultSet.getString("HOSTNAME"));
        int dataCartridgeId = resultSet.getInt("DATA_CARTRIDGE_ID");
        if (dataCartridgeId != 0) {
          DataCartridge dataCartridge = new DataCartridge();
View Full Code Here


  private static void populateSubscription(CartridgeSubscription cartridgeSubscription, ResultSet resultSet)
      throws Exception {
    String repoName = resultSet.getString("REPO_NAME");
    if (repoName != null) {
      Repository repo = new Repository();
      repo.setRepoName(repoName);
      cartridgeSubscription.setRepository(repo);
    }

    int dataCartridgeId = resultSet.getInt("DATA_CARTRIDGE_ID");
    if (dataCartridgeId != 0) {
View Full Code Here

    }

  private Repository createRepository(String cartridgeName, String tenantDomain, String userName, String password)
                                                                                                 throws Exception {

    Repository repository = new Repository();
    String repoName = tenantDomain + "/" + cartridgeName;

    try {
     
      log.info("Creating internal repo ["+repoName+"] ");
View Full Code Here

        String clusterSubDomain = CartridgeConstants.DEFAULT_SUBDOMAIN;
        String mgtClusterDomain = "";
        String mgtClusterSubDomain = CartridgeConstants.DEFAULT_MGT_SUBDOMAIN;
        CartridgeSubscription subscription = null;
        String mysqlPassword = null;
        Repository repository = null;
        DataCartridge dataCartridge = null;
        String cartName = (alias != null && alias.trim().length() > 0) ? alias : cartridgeType;
        String payloadZipFileName = "/tmp/" + UUID.randomUUID().toString() + ".zip";

    log.info("Subscribing tenant [" + tenantId + "] with username [" + username + "] Cartridge Alias " + alias
View Full Code Here

    private static Repository manageRepository(String repoURL, String repoUserName, String repoUserPassword,
                                               String cartName, CartridgeInfo cartridgeInfo, String username,
                                               String tenantDomain)
            throws Exception {

        Repository repository = new Repository();
        if (repoURL != null && repoURL.trim().length() > 0) {
            log.info("External REPO URL is provided as [" + repoURL +
                    "]. Therefore not creating a new repo.");
            //repository.setRepoName(repoURL.substring(0, repoURL.length()-4)); // remove .git part
            repository.setRepoName(repoURL);
            repository.setRepoUserName(repoUserName);
            repository.setRepoUserPassword(repoUserPassword);
        } else {

            //log.info("External REPO URL is not provided. Therefore creating a new repo. Adding to Executor");
            log.info("External git repo url not provided for tenant "
                    + tenantDomain + ", creating an git internal repository");

            // for internal repos  internal git server username and password is used.
            repository.setRepoUserName(System.getProperty(CartridgeConstants.INTERNAL_GIT_USERNAME));
            repository.setRepoUserPassword(System.getProperty(CartridgeConstants.INTERNAL_GIT_PASSWORD));
            /*repoCreationExecutor.execute(new RepositoryCreator(new RepositoryInfoBean(repoURL,
                    cartName,
                    tenantDomain,
                    repository.getRepoUserName(),
                    repository.getRepoUserPassword(),
                    cartridgeInfo.getDeploymentDirs(),
                    cartridgeInfo)));*/
            new RepositoryCreator(new RepositoryInfoBean(repoURL,
                    cartName,
                    tenantDomain,
                    repository.getRepoUserName(),
                    repository.getRepoUserPassword(),
                    cartridgeInfo.getDeploymentDirs(),
                    cartridgeInfo)).createInternalRepository();
            String repoName = tenantDomain + "/" + cartName;
            repository.setRepoName("https://" + System.getProperty(CartridgeConstants.GIT_HOST_NAME) + ":8443/git/" + repoName);

        }
        return repository;
    }
View Full Code Here

TOP

Related Classes of org.apache.stratos.adc.mgt.dao.Repository

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.