Skip to content

Commit 6737879

Browse files
committed
refactor get method to use version instead of release number
Former-commit-id: d77efda7e5a110cbaefec865e62e2d27ff5f0fca
1 parent 6f5c058 commit 6737879

File tree

1 file changed

+10
-8
lines changed
  • src/main/java/com/oracle/weblogicx/imagebuilder/builder/util

1 file changed

+10
-8
lines changed

src/main/java/com/oracle/weblogicx/imagebuilder/builder/util/ARUUtil.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,25 +71,27 @@ public static void getAllFMWReleases(String userId, String password) throws IOEx
7171
/**
7272
* Download the latest WLS patches(PSU) for the release
7373
*
74-
* @param release release number
74+
* @param version release number
7575
* @param userId userid for support account
7676
* @param password password for support account
7777
* @throws IOException when failed to access the aru api
7878
*/
79-
public static void getLatestWLSPSU(String release, String userId, String password) throws IOException {
80-
getLatestPSU("wls", release, userId, password);
79+
public static void getLatestWLSPSU(String version, String userId, String password) throws IOException {
80+
String releaseNumber = getReleaseNumber("wls", version, userId, password);
81+
getLatestPSU("wls", releaseNumber, userId, password);
8182
}
8283

8384
/**
8485
* Download the latest FMW patches(PSU) for the release
8586
*
86-
* @param release release number
87+
* @param version version number 12.2.1.3.0
8788
* @param userId userid for support account
8889
* @param password password for support account
8990
* @throws IOException when failed to access the aru api
9091
*/
91-
public static void getLatestFMWPSU(String release, String userId, String password) throws IOException {
92-
getLatestPSU("fmw", release, userId, password);
92+
public static void getLatestFMWPSU(String version, String userId, String password) throws IOException {
93+
String releaseNumber = getReleaseNumber("wls", version, userId, password);
94+
getLatestPSU("fmw", releaseNumber, userId, password);
9395
}
9496

9597
/**
@@ -188,7 +190,7 @@ private static Document getAllReleases(String category, String userId, String p
188190
}
189191

190192
doc.appendChild(element);
191-
XPathUtil.prettyPrint(doc);
193+
//XPathUtil.prettyPrint(doc);
192194

193195
return doc;
194196

@@ -285,7 +287,7 @@ private static String getReleaseNumber(String category, String version, String u
285287
}
286288

287289
public static void main(String args[]) throws Exception {
288-
ARUUtil.getLatestWLSPSU("600000000073715","[email protected]", "iJCPiUah7jdmLk1E");
290+
ARUUtil.getLatestWLSPSU("12.2.1.3.0","[email protected]", "iJCPiUah7jdmLk1E");
289291
}
290292

291293

0 commit comments

Comments
 (0)