001 package org.apache.maven.scm.provider.integrity.repository; 002 003 /** 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022 import org.apache.maven.scm.log.ScmLogger; 023 import org.apache.maven.scm.provider.ScmProviderRepositoryWithHost; 024 import org.apache.maven.scm.provider.integrity.APISession; 025 import org.apache.maven.scm.provider.integrity.Project; 026 import org.apache.maven.scm.provider.integrity.Sandbox; 027 028 /** 029 * MKS Integrity implementation of Maven's ScmProviderRepositoryWithHost 030 * <br>This class stores an abstraction of the MKS API Session, Project, and Sandbox 031 * 032 * @author <a href="mailto:cletus@mks.com">Cletus D'Souza</a> 033 * @version $Id: IntegrityScmProviderRepository.java 1.2 2011/08/22 13:06:43EDT Cletus D'Souza (dsouza) Exp $ 034 * @since 1.6 035 */ 036 public class IntegrityScmProviderRepository 037 extends ScmProviderRepositoryWithHost 038 { 039 // Configuration Path for the MKS Integrity SCM Project 040 private String configurationPath; 041 042 // MKS API Session 043 private APISession api; 044 045 // Encapsulation for our MKS Integrity SCM Project 046 private Project siProject; 047 048 // Encapsulation for our MKS Integrity SCM Sandbox 049 private Sandbox siSandbox; 050 051 /** 052 * IntegrityScmProviderRepository constructor 053 * 054 * @param host MKS Integrity Server hostname or ip address 055 * @param port MKS Integrity Server port number 056 * @param user MKS Integrity Server username 057 * @param paswd Password for MKS Integrity Server username 058 * @param configPath MKS Integrity SCM Project Configuration Path 059 * @param logger Maven ScmLogger object 060 */ 061 public IntegrityScmProviderRepository( String host, int port, String user, String paswd, String configPath, 062 ScmLogger logger ) 063 { 064 super(); 065 setHost( host ); 066 setPort( port ); 067 setUser( user ); 068 setPassword( paswd ); 069 configurationPath = configPath; 070 api = new APISession( logger ); 071 logger.debug( "Configuration Path: " + configurationPath ); 072 } 073 074 /** 075 * Returns the MKS Integrity SCM Project object for this SCM Provider 076 * 077 * @return MKS Integrity SCM Project object 078 */ 079 public Project getProject() 080 { 081 return siProject; 082 } 083 084 /** 085 * Sets the MKS Integrity SCM Project object for this SCM Provider 086 * 087 * @param project MKS Integrity SCM Project object 088 */ 089 public void setProject( Project project ) 090 { 091 siProject = project; 092 } 093 094 /** 095 * Returns the MKS Integrity SCM Sandbox object for this SCM Provider 096 * 097 * @return MKS Integrity SCM Sandbox object 098 */ 099 public Sandbox getSandbox() 100 { 101 return siSandbox; 102 } 103 104 /** 105 * Sets the MKS Integrity SCM Sandbox object for this SCM Provider 106 * 107 * @param sandbox MKS Integrity SCM Sandbox object 108 */ 109 public void setSandbox( Sandbox sandbox ) 110 { 111 siSandbox = sandbox; 112 } 113 114 /** 115 * Returns the MKS Integrity API Session object for this SCM Provider 116 * 117 * @return MKS Integrity API Session 118 */ 119 public APISession getAPISession() 120 { 121 return api; 122 } 123 124 /** 125 * Returns the MKS Integrity SCM Project Configuration Path 126 * 127 * @return MKS Integrity SCM Project Configuration Path 128 */ 129 public String getConfigruationPath() 130 { 131 return configurationPath; 132 } 133 }