Skip to content

Commit d1ef9ea

Browse files
committed
Added messages to the single resource bundle file and a writeInputStreamToFile() function
1 parent 3ddace5 commit d1ef9ea

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

core/src/main/java/oracle/weblogic/deploy/util/FileUtils.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import java.io.ByteArrayOutputStream;
88
import java.io.File;
99
import java.io.FileInputStream;
10+
import java.io.FileOutputStream;
1011
import java.io.FilenameFilter;
1112
import java.io.IOException;
1213
import java.io.InputStream;
@@ -593,6 +594,24 @@ public static byte[] readInputStreamToByteArray(InputStream input) throws IOExce
593594
return outputStream.toByteArray();
594595
}
595596

597+
public static File writeInputStreamToFile(InputStream input, String fileName) throws IOException {
598+
FileOutputStream fos = null;
599+
File file = null;
600+
601+
try {
602+
File tmpdir = new File(System.getProperty("java.io.tmpdir"));
603+
file = new File(tmpdir, fileName);
604+
byte[] byteArray = FileUtils.readInputStreamToByteArray(input);
605+
fos = new FileOutputStream(file);
606+
fos.write(byteArray);
607+
}
608+
finally {
609+
if (fos != null) { fos.close(); }
610+
}
611+
612+
return file;
613+
}
614+
596615
///////////////////////////////////////////////////////////////////////////
597616
// Private helper methods //
598617
///////////////////////////////////////////////////////////////////////////

core/src/main/resources/oracle/weblogic/deploy/messages/wlsdeploy_rb.properties

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,3 +1115,42 @@ WLSDPLY-20019=Filter entry in {0} has neither ID or path
11151115
WLSDPLY-20020=Filter ID {0} is invalid
11161116
WLSDPLY-20021=Filter path {0} does not exist
11171117
WLSDPLY-20022=Error loading filter path {0}
1118+
1119+
####################################################################
1120+
# Message number 09800 - 09999 wls-deploy-integration-test #
1121+
####################################################################
1122+
WLSDPLY-09800=Running the {0} test
1123+
WLSDPLY-09801=Could not translate {0} test config file into a python dictionary
1124+
WLSDPLY-09802=Test using the {0} file, produced the following test results: {1}
1125+
WLSDPLY-09803={0} ({1}) ... ok
1126+
WLSDPLY-09804={0} ({1}) ... failed: {2}
1127+
WLSDPLY-09805=Internal error: {0} file is missing the plans dictionary key
1128+
WLSDPLY-09806=Internal error: {0} is not a plan name in the plans map
1129+
WLSDPLY-09807=Error translating {0} file into a python dictionary: {1}
1130+
WLSDPLY-09808=Could not access {0} file
1131+
WLSDPLY-09809=Could not access {0} directory
1132+
WLSDPLY-09810=Test produced {0} error, {1} warning, and {2} informational messages.
1133+
WLSDPLY-09811=See the next {0} log messages for the details.
1134+
WLSDPLY-09812={0} ({1}.{2}) VerificationException: {3} field cannot be missing
1135+
WLSDPLY-09813={0} has a {1} test configuration type, but it must have a {2} test configuration type to be used for test config file verification
1136+
WLSDPLY-09814=Error applying {0} test configuration overrides file: {1}
1137+
WLSDPLY-09815=There is no plan named {0} in the {1} test configuration file
1138+
WLSDPLY-09816=There is no settings named {0} in the {1} test configuration file
1139+
WLSDPLY-09817={0} plan module has already been loaded, so using cached object
1140+
WLSDPLY-09818={0} plan module has not been loaded yet. Attempting to load it...
1141+
WLSDPLY-09819={0}.{1} is not valid for use as a plan module because it is not a subclass of unitttest.Test
1142+
WLSDPLY-09820=Running {0} to {1} plan step as test number {2}
1143+
WLSDPLY-09821=Running {0} type test for the {1} plan
1144+
WLSDPLY-09822={0} plan module could not be imported: {1}
1145+
WLSDPLY-09823={0} test configuration file contains an unsupported test configuration type: {1}. The currently supported types are: {2}
1146+
WLSDPLY-09824=Unable to find {0} resource in the binary of the installable
1147+
WLSDPLY-09825=Unable to extract {0} file from the binary of the installable
1148+
WLSDPLY-09826={0} ({1}) raised an error: {2}
1149+
WLSDPLY-09827={0} test configuration is missing a required field: {1}
1150+
WLSDPLY-09828={0} is a malformed metadata path; must be the name of a metadata field or a forward-slash delimited path to a metadata field
1151+
WLSDPLY-09829=Metadata path to required field {0} contains a {1} token, but test configuration has no {2} field instances in it
1152+
WLSDPLY-09830={0} is not one of the predefined wildcard fields: {1}
1153+
WLSDPLY-09831=The predefined wildcard fields can only appear in the plans or settings section of a test configuration metadata file
1154+
WLSDPLY-09832={0} exited with error code {1}
1155+
WLSDPLY-09833={0} step did not write a model file to the {1} archive file
1156+
WLSDPLY-09834={0} step did not write a {1} model file to the file system

0 commit comments

Comments
 (0)