77from java .lang .reflect import InvocationTargetException
88from oracle .weblogic .deploy .util import CustomBeanUtils
99
10+ from wlsdeploy .aliases .location_context import LocationContext
1011from wlsdeploy .exception import exception_helper
1112from wlsdeploy .tool .util .alias_helper import AliasHelper
1213from wlsdeploy .tool .util .wlst_helper import WlstHelper
@@ -27,41 +28,41 @@ def __init__(self, aliases, logger, exception_type):
2728 self .weblogic_helper = WebLogicHelper (self .logger )
2829 self .wlst_helper = WlstHelper (self .logger , self .exception_type )
2930
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 ):
3132 """
3233 Update the specified security model nodes in WLST.
3334 :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'
3738 :param model_nodes: a child model nodes of the provider to be updated
3839 :raises: BundleAwareException of the specified type: if an error occurs
3940 """
4041 _method_name = 'update_security_folder'
4142
4243 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 ,
4445 class_name = self .__class_name , method_name = _method_name )
4546
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 ,
4748 class_name = self .__class_name , method_name = _method_name )
4849
4950 create_path = self .alias_helper .get_wlst_subfolders_path (location )
5051 self .wlst_helper .cd (create_path )
5152
52- # create the MBean using the model name, model_type, category
53+ # create the MBean using the model type, name, and subtype
5354
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 )
5758
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 )
6061
61- provider_path = self .alias_helper .get_wlst_attributes_path (location )
62+ provider_path = self .alias_helper .get_wlst_attributes_path (type_location )
6263 provider_mbean = self .wlst_helper .cd (provider_path )
6364
64- interface_name = model_type + 'MBean'
65+ interface_name = model_subtype + 'MBean'
6566 bean_info = self .weblogic_helper .get_bean_info_for_interface (interface_name )
6667 if bean_info is None :
6768 ex = exception_helper .create_exception (self .exception_type , 'WLSDPLY-12125' , interface_name )
0 commit comments