@@ -98,6 +98,19 @@ public class DomainSpec extends BaseConfiguration {
98
98
@ Expose
99
99
private String logHome ;
100
100
101
+ /**
102
+ * Whether the log home is enabled.
103
+ *
104
+ * @since 2.0
105
+ */
106
+ @ SerializedName ("logHomeEnabled" )
107
+ @ Expose
108
+ @ Description (
109
+ "Specified whether the log home folder is enabled (Not required). "
110
+ + "Defaults to true if domainHomeInImage is false. "
111
+ + "Defaults to false if domainHomeInImage is true. " )
112
+ private Boolean logHomeEnabled ; // Boolean object, null if unspecified
113
+
101
114
/** Whether to include the server .out file to the pod's stdout. Default is true. */
102
115
@ SerializedName ("includeServerOutInPodLog" )
103
116
@ Expose
@@ -223,29 +236,6 @@ public class DomainSpec extends BaseConfiguration {
223
236
@ Description ("Configuration for the clusters" )
224
237
protected Map <String , Cluster > clusters = new HashMap <>();
225
238
226
- /**
227
- * The log home.
228
- *
229
- * @since 2.0
230
- */
231
- @ SerializedName ("logHome" )
232
- @ Expose
233
- @ Description ("The folder for the log files (Not required). Defaults to /shared/logs/domainUID. " )
234
- protected String logHome ;
235
-
236
- /**
237
- * Whether the log home is enabled.
238
- *
239
- * @since 2.0
240
- */
241
- @ SerializedName ("logHomeEnabled" )
242
- @ Expose
243
- @ Description (
244
- "Specified whether the log home folder is enabled (Not required). "
245
- + "Defaults to true if domainHomeInImage is false. "
246
- + "Defaults to false if domainHomeInImage is true. " )
247
- private Boolean logHomeEnabled ; // Boolean object, null if unspecified
248
-
249
239
public AdminServer getOrCreateAdminServer (String adminServerName ) {
250
240
if (adminServer != null ) return adminServer ;
251
241
@@ -345,49 +335,6 @@ public void setDomainHome(String domainHome) {
345
335
this .domainHome = domainHome ;
346
336
}
347
337
348
- /**
349
- * Log home
350
- *
351
- * @since 2.0
352
- * @return log home
353
- */
354
- public String getLogHome () {
355
- return Optional .ofNullable (logHome ).orElse (String .format (LOG_HOME_DEFAULT_PATTERN , domainUID ));
356
- }
357
-
358
- /**
359
- * Log home
360
- *
361
- * @since 2.0
362
- * @param logHome log home
363
- */
364
- public void setLogHome (String logHome ) {
365
- this .logHome = logHome ;
366
- }
367
-
368
- /**
369
- * Log home enabled
370
- *
371
- * @since 2.0
372
- * @return log home enabled
373
- */
374
- public boolean getLogHomeEnabled () {
375
- if (logHomeEnabled == null ) {
376
- return !isDomainHomeInImage ();
377
- }
378
- return logHomeEnabled .booleanValue ();
379
- }
380
-
381
- /**
382
- * Log home enabled
383
- *
384
- * @since 2.0
385
- * @param logHomeEnabled log home enabled
386
- */
387
- public void setLogHomeEnabled (boolean logHomeEnabled ) {
388
- this .logHomeEnabled = new Boolean (logHomeEnabled );
389
- }
390
-
391
338
/*
392
339
* Fluent api for setting the image.
393
340
*
@@ -532,7 +479,7 @@ public void setImagePullSecrets(@Nullable List<V1LocalObjectReference> imagePull
532
479
* server .out files in.
533
480
*/
534
481
public String getLogHome () {
535
- return logHome ;
482
+ return Optional . ofNullable ( logHome ). orElse ( String . format ( LOG_HOME_DEFAULT_PATTERN , domainUID )) ;
536
483
}
537
484
538
485
public void setLogHome (String logHome ) {
@@ -544,6 +491,29 @@ public DomainSpec withLogHome(String logHome) {
544
491
return this ;
545
492
}
546
493
494
+ /**
495
+ * Log home enabled
496
+ *
497
+ * @since 2.0
498
+ * @return log home enabled
499
+ */
500
+ public boolean getLogHomeEnabled () {
501
+ if (logHomeEnabled == null ) {
502
+ return !isDomainHomeInImage ();
503
+ }
504
+ return logHomeEnabled .booleanValue ();
505
+ }
506
+
507
+ /**
508
+ * Log home enabled
509
+ *
510
+ * @since 2.0
511
+ * @param logHomeEnabled log home enabled
512
+ */
513
+ public void setLogHomeEnabled (boolean logHomeEnabled ) {
514
+ this .logHomeEnabled = new Boolean (logHomeEnabled );
515
+ }
516
+
547
517
/**
548
518
* Whether to include server .out to the pod's stdout
549
519
*
0 commit comments