⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resourcetype.java

📁 OBPM是一个开源
💻 JAVA
字号:
package cn.myapps.core.resource.ejb;

public class ResourceType {
	
	
	public static final String ACTION_TYPE_NONE = "00";
	public static final String ACTION_TYPE_VIEW = "01";
	public static final String ACTION_TYPE_ACTIONCLASS = "02";
	public static final String ACTION_TYPE_OTHERURL = "03";
	
	public static final String RESOURCE_TYPE_MENU = "00";
	public static final String RESOURCE_TYPE_PAGE = "01";
	
	public static final String ISPROTECTED_YES = "yes";
	public static final String ISPROTECTED_NO = "no";
	
	public static final String[] TYPES = { "", "00", "01" };

	public static final String[] NAMES = { "", "menu", "page" };

	/**
	 * Get the type name.
	 * @param type The type.
	 * @return The type name.
	 */
	public static String getName(String type) {
		if (type == null)
			return null;

		for (int i = 0; i < TYPES.length; i++)
			if (type.equals(TYPES[i]))
				return NAMES[i];

		return "";
	}

	/**
	 * Get the type code.
	 * @param name The type name.
	 * @return The type code.
	 */
	public static String getType(String name) {
		if (name == null)
			return null;

		for (int i = 0; i < NAMES.length; i++)
			if (name.equals(TYPES[i]))
				return TYPES[i];

		return "";
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -