Skip to content
This repository has been archived by the owner on Nov 22, 2019. It is now read-only.

Commit

Permalink
Added set methods for model objects used in the forms.
Browse files Browse the repository at this point in the history
  • Loading branch information
elvisisking committed Oct 9, 2017
1 parent b81535b commit 9199d5a
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
Expand Up @@ -22,6 +22,7 @@ import { EventEmitter } from "@angular/core";
import { Output } from "@angular/core";
import { Router } from "@angular/router";
import { NewConnection } from "@connections/shared/new-connection.model";
import { de } from "ngx-bootstrap/locale";

@Component({
moduleId: module.id,
Expand All @@ -48,27 +49,55 @@ export class AddActivityFormComponent {
return this.model.getDescription();
}

/**
* @param {string} description the new activity description
*/
public set activityDescription( description: string ) {
this.model.setDescription( description );
}

/**
* @returns {string} the activity name
*/
public get activityName(): string {
return this.model.getName();
}

/**
* @param {string} name the new activity name
*/
public set activityName( name: string ) {
this.model.setName( name );
}

/**
* @returns {string} the activity's source connection
*/
public get activitySource(): NewConnection {
return this.model.getSourceConnection();
}

/**
* @param {string} source the new activity source
*/
public set activitySource( source: NewConnection ) {
this.model.setSourceConnection( source );
}

/**
* @returns {string} the activity's target connection
*/
public get activityTarget(): NewConnection {
return this.model.getTargetConnection();
}

/**
* @param {string} target the new activity target
*/
public set activityTarget( target: NewConnection ) {
this.model.setTargetConnection( target );
}

public get currentActivity(): string {
return JSON.stringify(this.model);
}
Expand Down
Expand Up @@ -45,27 +45,55 @@ export class AddConnectionFormComponent {
return this.model.getName();
}

/**
* @param {string} name the new connection name
*/
public set connectionName( name: string ) {
this.model.setName( name );
}

/**
* @returns {string} the driver name of the connection
*/
public get connectionDriverName(): string {
return this.model.getDriverName();
}

/**
* @param {string} driverName the new connection driver name
*/
public set connectionDriverName( driverName: string ) {
this.model.setDriverName( driverName );
}

/**
* @returns {boolean} true if a JDBC connection
*/
public get connectionIsJdbc(): boolean {
return this.model.isJdbc();
}

/**
* @param {boolean} isJdbc true if the new connection is a JDBC connection
*/
public set connectionIsJdbc( isJdbc: boolean ) {
this.model.setJdbc( isJdbc );
}

/**
* @returns {string} the JNDI name of the connection
*/
public get connectionJndiName(): string {
return this.model.getJndiName();
}

/**
* @param {string} jndiName the new connection JNDI name
*/
public set connectionJndiName( jndiName: string ) {
this.model.setJndiName( jndiName );
}

public currentConnection(): string {
return JSON.stringify(this.model);
}
Expand Down

0 comments on commit 9199d5a

Please sign in to comment.