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

📄 constents.java

📁 struts+hibernate BBS mysql数据库 功能基本齐全
💻 JAVA
字号:
package com.elan.forum.util;

public class Constents {
	
	public static String CONTEXTPATH = "/ElanNet";

	public static String PATH_INDEX_FORUM = "<a href=\"/ElanNet/forum/Test.jsp\">网站首页</a>>><a href=\"/ElanNet/forum/Test.jsp\">商城社区</a>";
	
	public static StringBuffer PATH_INDEX = null;

	public static StringBuffer PATH_FORUM = null;

	public static String SESSION_CONTAINER_KEY = "sessionContainer";

	public static String FORUMUSER_KEY = "forumUser";

	public static String USER_LOGON_ERROR_KEY = "userLogonFailure";

	
	//用户修改信息成功
	public static int USER_MODIFY_SUCCESS = 1;
	
	public static int CURRENT_OPERATION_SUCCESS = 1;
	
	public static int CURRENT_OPERATION_ERROR = -1;

	public static int DELETE_USER_ERROR = 2;
	
	public static String TOPIC_SESSIONCONTAINER_KEY= "com.elan.forum.actions.util.TopicSessionContainer";
	
	public static Integer DEFAULT_PAGE_SIZE = 10;

	//设置显示piece下面文章的条数 10
	public static Integer piecePageSize = new Integer(10);
	
	//设置回复topic的条数 8
	public static Integer topicReplyPageSize = new Integer(8);
	
	//设置下那是全部范围的新发的帖子的页码大小
	public static Integer newPostTopicPageSize = new Integer(20);
	
	//设置下面返回新帖子的条数 30条
	public static Integer newPostTopicCount = new Integer(30);
	
	//设置hot的反户条数
	public static Integer hotTopicCount = new Integer(10);
	
	//设置搜索的返回最大页码大小
	public static Integer searchPageSize = new Integer(10);
	
	
	// 设置精华帖子的页码大小
	public static Integer essencePageSize = new Integer(10);
	
	
	private static long theDayTopicNum = 0; // 当天数

	private static long topicNum = 0; // topic数

	private static long topicAllNum = 0; // 总的数,包裹回复

	private static long userNum = 0;

	private static String newUser = "No New";
	
	
	
	
	//private static String 

	static {
		PATH_INDEX = new StringBuffer("网站首页>>");
		PATH_FORUM = new StringBuffer("商城社区>>");
	}

	public static synchronized void addTopicNum() {
		++theDayTopicNum;
		++topicNum;
		++topicAllNum;
	}

	public static long getTheDayTopicNum() {
		return theDayTopicNum;
	}

	public static long getTopicNum() {
		return topicNum;
	}

	public static long getTopicAllNum() {
		return topicAllNum;
	}

	public static synchronized void addUserNum() {
		++userNum;
	}

	public static long getUserNum() {
		return userNum;
	}

	public static synchronized void setNewUser(String newUser) {
		Constents.newUser = newUser;
	}

	public static String getNewUser() {
		return newUser;
	}
}

⌨️ 快捷键说明

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