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.shim;
022:
023: import com.methodhead.auth.AuthUser;
024: import com.methodhead.util.OperationContext;
025:
026: public interface ShimPolicy {
027:
028: // constants ////////////////////////////////////////////////////////////////
029:
030: // constructors /////////////////////////////////////////////////////////////
031:
032: // methods //////////////////////////////////////////////////////////////////
033:
034: /**
035: * Instantiates a new <tt>Page</tt>.
036: */
037: public Page newPage();
038:
039: /**
040: * Instantiates a new <tt>Template</tt>.
041: */
042: public Template newTemplate();
043:
044: /**
045: * Instantiates a new <tt>TextModule</tt>.
046: */
047: public TextModule newTextModule();
048:
049: /**
050: * Instantiates a new <tt>TextModule</tt>.
051: */
052: public NavModule newNavModule();
053:
054: /**
055: * Instantiates a new <tt>IncludeModule</tt>.
056: */
057: public IncludeModule newIncludeModule();
058:
059: /**
060: * Instantiates a new <tt>TextModule</tt>.
061: */
062: public Thumbnailer newThumbnailer();
063:
064: /**
065: * Returns <tt>true</tt> if <tt>user</tt> is authorized to execute the
066: * specified path.
067: */
068: public boolean isMappingAuthorized(AuthUser user, String path);
069:
070: public String isHomeAuthorized(OperationContext op);
071:
072: public String isSiteMapAuthorized(OperationContext op);
073:
074: public String isLinkAuthorized(OperationContext op);
075:
076: public String isHtmlFragmentDeleteAuthorized(OperationContext op);
077:
078: public String isHtmlFragmentListAuthorized(OperationContext op);
079:
080: public String isHtmlFragmentSaveAuthorized(OperationContext op);
081:
082: public String isHtmlFragmentSaveNewAuthorized(OperationContext op);
083:
084: public String isHtmlFragmentNewAuthorized(OperationContext op);
085:
086: public String isHtmlFragmentEditAuthorized(OperationContext op);
087:
088: public String isEditorListImagesAuthorized(OperationContext op);
089:
090: public String isEditorPickImageAuthorized(OperationContext op);
091:
092: public String isEditorDisplayFilesAuthorized(OperationContext op);
093:
094: public String isEditorPickFileAuthorized(OperationContext op);
095:
096: public String isEditorPickPageAuthorized(OperationContext op);
097:
098: public String isEditorListPagesAuthorized(OperationContext op);
099:
100: public String isConfigureTextModuleAuthorized(OperationContext op);
101:
102: public String isConfigureNavModuleAuthorized(OperationContext op);
103:
104: public String isConfigureIncludeModuleAuthorized(OperationContext op);
105:
106: public String isNewPageFormAuthorized(OperationContext op);
107:
108: public String isConfigurePageAuthorized(OperationContext op);
109:
110: public String isConfigurePageFormAuthorized(OperationContext op);
111:
112: public String isEditPageAuthorized(OperationContext op);
113:
114: public String isConfigureModuleAuthorized(OperationContext op);
115:
116: public String isEditPanelAuthorized(OperationContext op);
117:
118: public String isSavePanelAuthorized(OperationContext op);
119:
120: public String isDeletePageFormAuthorized(OperationContext op);
121:
122: public String isDeletePageAuthorized(OperationContext op);
123:
124: public String isMovePageFormAuthorized(OperationContext op);
125:
126: public String isMovePageAuthorized(OperationContext op);
127:
128: public String isConfigurePanelFormAuthorized(OperationContext op);
129:
130: public String isConfigurePanelAuthorized(OperationContext op);
131:
132: public String isSwitchAuthorized(OperationContext op);
133:
134: public void setUpMenu(OperationContext op);
135:
136: public void setUpEditorMenu(OperationContext op, Page page);
137: }
|