Skip to content

Commit a5097fe

Browse files
authored
Merge pull request #370 from shaurabh-tiwari-git/vlocityOpenInterfaceMVP
@W-19323143 - vlocityOpenInterface and Logging fixes for apex.
2 parents f3c3115 + e72c577 commit a5097fe

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

messages/assess.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
"apexFileChangesIdentifiedNotApplied": "Changes identified for Apex class %s but not applied (assessment mode)",
111111
"apexFileHasMultipleInterfaces": "File %s has multiple interfaces including Callable, standardizing to System.Callable only",
112112
"apexFileImplementsVlocityOpenInterface2": "File %s implements VlocityOpenInterface2, replacing with System.Callable",
113+
"apexFileImplementsVlocityOpenInterface": "File %s implements VlocityOpenInterface, replacing with System.Callable",
113114
"errorParsingHtmlTemplate": "Error while parsing template",
114115
"errorParsingData": "Error while parsing data for template",
115116
"errorGeneratingHTML": "Error while generating HTML from template for %s with properties %s",

src/migration/related/ApexMigration.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,10 @@ export class ApexMigration extends BaseRelatedObjectMigration {
191191
tokenUpdates.push(new RangeTokenUpdate(CALLABLE, tokens[0], tokens[1]));
192192
tokenUpdates.push(new InsertAfterTokenUpdate(this.callMethodBody(), parser.classDeclaration));
193193
} else if (implementsInterface.has(this.vlocityOpenInterface)) {
194-
Logger.error(assessMessages.getMessage('fileImplementsVlocityOpenInterface', [file.name]));
194+
Logger.logger.info(assessMessages.getMessage('apexFileImplementsVlocityOpenInterface', [file.name]));
195+
const tokens = implementsInterface.get(this.vlocityOpenInterface);
196+
tokenUpdates.push(new RangeTokenUpdate(CALLABLE, tokens[0], tokens[1]));
197+
tokenUpdates.push(new InsertAfterTokenUpdate(this.callMethodBody(), parser.classDeclaration));
195198
}
196199
return tokenUpdates;
197200
}

src/utils/sfcli/project/sfProject.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Messages } from '@salesforce/core';
2+
import * as shell from 'shelljs';
23
import { Logger } from '../../logger';
34
import { cli } from '../../shell/cli';
45

@@ -14,7 +15,7 @@ export class sfProject {
1415
}
1516

1617
public static retrieve(metadataName: string, username: string): void {
17-
Logger.log(messages.getMessage('retrievingMetadata', [metadataName, username]));
18+
Logger.log(messages.getMessage('retrievingMetadata', [metadataName, shell.pwd().toString()]));
1819
const cmd = `sf project retrieve start --metadata ${metadataName} --target-org ${username}`;
1920
sfProject.executeCommand(cmd);
2021
Logger.log(messages.getMessage('metadataRetrieved', [metadataName, username]));

0 commit comments

Comments
 (0)