List of usage examples for com.liferay.portal.kernel.security.permission ResourceActionsUtil getModelResourceNamePrefix
public static String getModelResourceNamePrefix()
From source file:com.liferay.asset.util.AssetPublisherAddItemHolder.java
License:Open Source License
/** * @see AssetRendererFactory#getTypeName(Locale) *//*from w ww. ja va 2s. co m*/ private String _getModelResource(ResourceBundle resourceBundle) { String modelResourceNamePrefix = ResourceActionsUtil.getModelResourceNamePrefix(); String key = modelResourceNamePrefix.concat(_name); String value = LanguageUtil.get(_locale, key, null); if ((value == null) && (resourceBundle != null)) { value = ResourceBundleUtil.getString(resourceBundle, key); } if (value == null) { value = _name; } return value; }
From source file:jorgediazest.util.model.ModelImpl.java
License:Open Source License
public String getDisplayName(Locale locale) { String displayName = ResourceActionsUtil.getModelResource(locale, getClassName()); if (displayName.startsWith(ResourceActionsUtil.getModelResourceNamePrefix())) { return StringPool.BLANK; }//from ww w .ja v a2 s . c om if (Validator.isNull(this.suffix)) { return displayName; } return displayName + " (" + suffix + ")"; }