📄 privmsgaction.java
字号:
/*
* Copyright 2004 JavaFree.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.javabb.action;
import java.util.Date;
import java.util.List;
import org.javabb.action.infra.BaseAction;
import org.javabb.component.PostFormatter;
import org.javabb.infra.UserContext;
import org.javabb.transaction.PrivMsgTransaction;
import org.javabb.vo.PrivMsg;
import org.javabb.vo.User;
/**
* @author Lucas Teixeira - <a href="mailto:lucas@javabb.org">lucas@javabb.org</a>
*/
/*$Id: PrivMsgAction.java,v 1.6.8.2 2006/04/17 17:47:05 daltoncamargo Exp $*/
public class PrivMsgAction extends BaseAction {
private PostFormatter postFormatter;
private PrivMsg pm;
private List lstMsgs;
private PrivMsgTransaction pmTransaction = null;
//Reply
private String title;
private Long userId;
private String username;
private String msg;
//action identifier
private String act;
//multiple selector
private Long[] idPm;
public String inbox() throws Exception {
User logado = UserContext.getContext().getUser();
lstMsgs = pmTransaction.getUserInbox(logado);
return SUCCESS;
}
public String outbox() throws Exception {
User logado = UserContext.getContext().getUser();
lstMsgs = pmTransaction.getUserOutbox(logado);
return SUCCESS;
}
public String readIn() throws Exception {
pm = pmTransaction.loadRecivied(pm);
act = "readIn";
if (pm.getUserTo().equals(UserContext.getContext().getUser()))
return SUCCESS;
else
throw new Exception("Voc
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -