export class GeneralInfo { constructor ( private _artifactId , private _version , private _scopes , private _path , private _pkgType , private _sha1 ? , private _sha256 ? ) { } public get artifactId ( ) : string { return this . _artifactId ; } public set artifactId ( artifactId ) { this . _artifactId = artifactId ; } public get version ( ) : string { return this . _version ; } public set version ( version ) { this . _version = version ; } public get scopes ( ) : string [ ] { return this . _scopes ; } public set scopes ( scopes ) { this . _scopes = scopes ; } public get path ( ) : string { return this . _path ; } public set path ( path ) { this . _path = path ; } public get pkgType ( ) : string { return this . _pkgType ; } public set pkgType ( pkgType ) { this . _pkgType = pkgType ; } public get sha1 ( ) : string | undefined { return this . _sha1 ; } public set sha1 ( sha1 ) { this . _sha1 = sha1 ; } public get sha256 ( ) : string | undefined { return this . _sha256 ; } public set sha256 ( sha1 ) { this . _sha1 = sha1 ; } public getComponentId ( ) { return this . _artifactId + ':' + this . _version ; } public update ( newGeneralInfo ) { if ( newGeneralInfo . _artifactId !== '' ) { this . artifactId = newGeneralInfo . artifactId ; } if ( newGeneralInfo . path !== '' ) { this . path = newGeneralInfo . path ; } if ( newGeneralInfo . pkgType !== '' ) { this . pkgType = newGeneralInfo . pkgType ; } if ( newGeneralInfo . scopes . length !== 0 ) { this . scopes = newGeneralInfo . scopes ; } if ( newGeneralInfo . version !== '' ) { this . version = newGeneralInfo . version ; } if ( newGeneralInfo . sha1 !== '' ) { this . sha1 = newGeneralInfo . sha1 ; } } }