Skip to content

Commit d3c5ee7

Browse files
committed
Issue #354 - Improve check for JRF domain type
1 parent 94d7b95 commit d3c5ee7

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

core/src/main/python/wlsdeploy/tool/create/domain_typedef.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ class DomainTypedef(object):
2828
__domain_typedefs_location = os.path.join(os.environ.get('WLSDEPLOY_HOME'), 'lib', 'typedefs')
2929
__domain_typedef_extension = '.json'
3030

31-
__wild_card_suffix = '%%'
32-
__wild_card_suffix_len = len(__wild_card_suffix)
31+
JRF_TEMPLATE_REGEX = "^(.*jrf_template[0-9._]*\\.jar)|(Oracle JRF WebServices Asynchronous services)$"
3332

3433
def __init__(self, program_name, domain_type):
3534
"""
@@ -95,12 +94,16 @@ def get_domain_type(self):
9594
"""
9695
return self._domain_type
9796

98-
def domain_type_is_jrf(self):
97+
def is_jrf_domain_type(self):
9998
"""
100-
Determine if the tool is running with domain type JRF or RestrictedJRF.
101-
:return : True if running with domain type JRF or RestrictedJRF.
99+
Determine if this is a JRF domain type by checking for the JRF extension template.
100+
This returns False for the Restricted JRF domain type.
101+
:return: True if the JRF template is present
102102
"""
103-
return self.get_domain_type() == 'JRF' or self.get_domain_type() == 'RestrictedJRF'
103+
for template in self.get_extension_templates():
104+
if re.match(self.JRF_TEMPLATE_REGEX, template):
105+
return True
106+
return False
104107

105108
def domain_type_has_jrf_resources(self):
106109
"""

0 commit comments

Comments
 (0)