001: /*
002: * Copyright (C) 2006 Methodhead Software LLC. All rights reserved.
003: *
004: * This file is part of TransferCM.
005: *
006: * TransferCM is free software; you can redistribute it and/or modify it under the
007: * terms of the GNU General Public License as published by the Free Software
008: * Foundation; either version 2 of the License, or (at your option) any later
009: * version.
010: *
011: * TransferCM is distributed in the hope that it will be useful, but WITHOUT ANY
012: * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
013: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
014: * details.
015: *
016: * You should have received a copy of the GNU General Public License along with
017: * TransferCM; if not, write to the Free Software Foundation, Inc., 51 Franklin St,
018: * Fifth Floor, Boston, MA 02110-1301 USA
019: */
020:
021: package com.methodhead;
022:
023: import com.methodhead.test.*;
024: import com.methodhead.sitecontext.*;
025: import com.methodhead.auth.*;
026: import com.methodhead.util.*;
027: import com.methodhead.property.*;
028: import com.methodhead.event.*;
029: import javax.servlet.http.*;
030: import org.apache.struts.action.*;
031:
032: public class TestPolicy implements AuthPolicy, SiteContextPolicy,
033: PropertyPolicy, EventPolicy {
034:
035: // constructors /////////////////////////////////////////////////////////////
036:
037: // constants ////////////////////////////////////////////////////////////////
038:
039: // classes //////////////////////////////////////////////////////////////////
040:
041: // methods //////////////////////////////////////////////////////////////////
042:
043: /**
044: * Returns a new {@link com.methodhead.test.TestUser TestUser}, convenient
045: * for testing. You'll most definitely want supply your own
046: * <tt>AuthPolicy</tt> implementation.
047: */
048: public AuthUser newUser() {
049: return new TestUser();
050: }
051:
052: /**
053: * Returns a new {@link com.methodhead.test.TestUser TestUser}, convenient
054: * for testing. You'll most definitely want supply your own
055: * <tt>AuthPolicy</tt> implementation.
056: */
057: public SiteAuthUser newSiteUser() {
058: return new TestSiteUser();
059: }
060:
061: public boolean autoLogin(AuthUser user, HttpServletRequest request,
062: ActionForm form) {
063: return true;
064: }
065:
066: public String isSiteLoginFormAuthorized(OperationContext op) {
067: return null;
068: }
069:
070: public String isSiteLoginAuthorized(OperationContext op) {
071: return null;
072: }
073:
074: public String isSiteLogoutAuthorized(OperationContext op) {
075: return null;
076: }
077:
078: public String isSiteContextDeleteAuthorized(OperationContext op) {
079: return null;
080: }
081:
082: public String isSiteContextSaveNewAuthorized(OperationContext op) {
083: return null;
084: }
085:
086: public String isSiteContextListAuthorized(OperationContext op) {
087: return null;
088: }
089:
090: public String isSiteContextEditAuthorized(OperationContext op) {
091: return null;
092: }
093:
094: public String isSiteContextNewAuthorized(OperationContext op) {
095: return null;
096: }
097:
098: public String isSiteContextSaveAuthorized(OperationContext op) {
099: return null;
100: }
101:
102: public String isListPropertiesAuthorized(OperationContext op) {
103: return null;
104: }
105:
106: public String isSetPropertyFormAuthorized(OperationContext op) {
107: return null;
108: }
109:
110: public String isSetPropertyAuthorized(OperationContext op) {
111: return null;
112: }
113:
114: public String isListEventsAuthorized(OperationContext op) {
115: return null;
116: }
117:
118: // properties ///////////////////////////////////////////////////////////////
119:
120: // attributes ///////////////////////////////////////////////////////////////
121: }
|