7
7
from java .lang .reflect import InvocationTargetException
8
8
from oracle .weblogic .deploy .util import CustomBeanUtils
9
9
10
+ from wlsdeploy .aliases .location_context import LocationContext
10
11
from wlsdeploy .exception import exception_helper
11
12
from wlsdeploy .tool .util .alias_helper import AliasHelper
12
13
from wlsdeploy .tool .util .wlst_helper import WlstHelper
@@ -27,41 +28,41 @@ def __init__(self, aliases, logger, exception_type):
27
28
self .weblogic_helper = WebLogicHelper (self .logger )
28
29
self .wlst_helper = WlstHelper (self .logger , self .exception_type )
29
30
30
- def update_security_folder (self , location , model_category , model_type , model_name , model_nodes ):
31
+ def update_security_folder (self , location , model_type , model_subtype , model_name , model_nodes ):
31
32
"""
32
33
Update the specified security model nodes in WLST.
33
34
:param location: the location for the provider
34
- :param model_category : the model category of the provider to be updated, such as AuthenticationProvider
35
- :param model_type : the model type of the provider to be updated, such as 'custom.my.CustomIdentityAsserter'
36
- :param model_name: the model name of the provider to be updated, such as 'My custom IdentityAsserter'
35
+ :param model_type : the type of the provider to be updated, such as AuthenticationProvider
36
+ :param model_subtype : the subtype of the provider to be updated, such as 'custom.my.CustomIdentityAsserter'
37
+ :param model_name: the name of the provider to be updated, such as 'My custom IdentityAsserter'
37
38
:param model_nodes: a child model nodes of the provider to be updated
38
39
:raises: BundleAwareException of the specified type: if an error occurs
39
40
"""
40
41
_method_name = 'update_security_folder'
41
42
42
43
location_path = self .alias_helper .get_model_folder_path (location )
43
- self .logger .entering (location_path , model_type , model_name ,
44
+ self .logger .entering (location_path , model_subtype , model_name ,
44
45
class_name = self .__class_name , method_name = _method_name )
45
46
46
- self .logger .info ('WLSDPLY-12124' , model_category , model_name , model_type , location_path ,
47
+ self .logger .info ('WLSDPLY-12124' , model_type , model_name , model_subtype , location_path ,
47
48
class_name = self .__class_name , method_name = _method_name )
48
49
49
50
create_path = self .alias_helper .get_wlst_subfolders_path (location )
50
51
self .wlst_helper .cd (create_path )
51
52
52
- # create the MBean using the model name, model_type, category
53
+ # create the MBean using the model type, name, and subtype
53
54
54
- location .append_location (model_category )
55
- token = self .alias_helper .get_name_token (location )
56
- location .add_name_token (token , model_name )
55
+ type_location = LocationContext ( location ) .append_location (model_type )
56
+ token = self .alias_helper .get_name_token (type_location )
57
+ type_location .add_name_token (token , model_name )
57
58
58
- mbean_category = self .alias_helper .get_wlst_mbean_type (location )
59
- self .wlst_helper .create (model_name , model_type , mbean_category )
59
+ mbean_type = self .alias_helper .get_wlst_mbean_type (type_location )
60
+ self .wlst_helper .create (model_name , model_subtype , mbean_type )
60
61
61
- provider_path = self .alias_helper .get_wlst_attributes_path (location )
62
+ provider_path = self .alias_helper .get_wlst_attributes_path (type_location )
62
63
provider_mbean = self .wlst_helper .cd (provider_path )
63
64
64
- interface_name = model_type + 'MBean'
65
+ interface_name = model_subtype + 'MBean'
65
66
bean_info = self .weblogic_helper .get_bean_info_for_interface (interface_name )
66
67
if bean_info is None :
67
68
ex = exception_helper .create_exception (self .exception_type , 'WLSDPLY-12125' , interface_name )
0 commit comments