def tokenize_classpath(self, classpath): """ Replace known types of directories with a tokens that represent the directory. :param classpath: containing a string of directories separated by environment specific classpath separator :return: tokenized classpath string """ cp_elements, separator = path_utils.split_classpath(classpath) for index, value in enumerate(cp_elements): cp_elements[index] = self.tokenize_path(value) return separator.join(cp_elements)
def _add_classpath_libraries_to_archive(self, model_name, model_value, location): """ This is a private method. Add the server files and directories listed in the server classpath attribute to the archive file. File locations in the oracle_home will be removed from the classpath and will not be added to the archive file. :param model_name: attribute for the server server start classpath attribute :param model_value: classpath value in domain :param location: context containing current location information :return model """ _method_name = 'add_classpath_libraries_to_archive' server_name = self._get_server_name_from_location(location) _logger.entering(server_name, model_name, model_value, class_name=_class_name, method_name=_method_name) classpath_string = None if not StringUtils.isEmpty(model_value): classpath_list = [] classpath_entries, separator = path_utils.split_classpath( model_value) if classpath_entries: for classpath_entry in classpath_entries: new_source_name = self._add_library( server_name, classpath_entry) if new_source_name is not None: classpath_list.append(new_source_name) classpath_string = StringUtils.getStringFromList( classpath_list, separator) _logger.fine('WLSDPLY-06617', server_name, classpath_string, class_name=_class_name, method_name=_method_name) _logger.exiting(class_name=_class_name, method_name=_method_name, result=classpath_string) return classpath_string