All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.system_properties.jsp Maven / Gradle / Ivy

<%--
/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */
--%>

<%@ include file="/init.jsp" %>

<%
int delta = ParamUtil.getInteger(request, SearchContainer.DEFAULT_DELTA_PARAM, SearchContainer.DEFAULT_DELTA);
String keywords = ParamUtil.getString(request, "keywords");
String screenNavigationCategoryKey = ParamUtil.getString(request, "screenNavigationCategoryKey", ServerAdminNavigationEntryConstants.CATEGORY_KEY_SYSTEM_PROPERTIES);
String screenNavigationEntryKey = ParamUtil.getString(request, "screenNavigationEntryKey", ServerAdminNavigationEntryConstants.ENTRY_KEY_SYSTEM_PROPERTIES);

PortletURL serverURL = renderResponse.createRenderURL();

serverURL.setParameter("mvcRenderCommandName", "/server_admin/view");
serverURL.setParameter("tabs1", tabs1);
serverURL.setParameter("delta", String.valueOf(delta));
serverURL.setParameter("screenNavigationCategoryKey", screenNavigationCategoryKey);
serverURL.setParameter("screenNavigationEntryKey", screenNavigationEntryKey);

PortletURL clearResultsURL = PortletURLUtil.clone(serverURL, liferayPortletResponse);

clearResultsURL.setParameter("navigation", StringPool.NULL);
clearResultsURL.setParameter("keywords", StringPool.BLANK);

Map filteredProperties = new TreeMap();

Properties properties = System.getProperties();

for (Map.Entry entry : properties.entrySet()) {
	String property = String.valueOf(entry.getKey());
	String value = StringPool.BLANK;

	if (ArrayUtil.contains(PropsValues.ADMIN_OBFUSCATED_PROPERTIES, property)) {
		value = StringPool.EIGHT_STARS;
	}
	else {
		value = String.valueOf(entry.getValue());
	}

	if (Validator.isNull(keywords) || property.contains(keywords) || value.contains(keywords)) {
		filteredProperties.put(property, value);
	}
}

List> filteredPropertiesList = ListUtil.fromCollection(filteredProperties.entrySet());

SearchContainer> propertiesSearchContainer = new SearchContainer(liferayPortletRequest, serverURL, null, null);

propertiesSearchContainer.setResults(ListUtil.subList(filteredPropertiesList, propertiesSearchContainer.getStart(), propertiesSearchContainer.getEnd()));
propertiesSearchContainer.setTotal(filteredPropertiesList.size());
%>




	
		

		

			<%
			String property = String.valueOf(entry.getKey());
			String value = String.valueOf(entry.getValue());
			%>

			

			
				
					
						
							
								<%= HtmlUtil.escape(StringUtil.shorten(value, 80)) %>
							
						
						
							<%= HtmlUtil.escape(value) %>
						
					
				
			
		

		
	




© 2015 - 2025 Weber Informatics LLC | Privacy Policy