01: package org.sakaiproject.metaobj.registry;
02:
03: import org.sakaiproject.content.util.BaseInteractionAction;
04: import org.sakaiproject.content.api.ContentEntity;
05: import org.sakaiproject.content.api.ResourceToolAction;
06: import org.sakaiproject.metaobj.shared.mgt.StructuredArtifactDefinitionManager;
07:
08: import java.util.List;
09:
10: /**
11: * Created by IntelliJ IDEA.
12: * User: johnellis
13: * Date: Feb 5, 2007
14: * Time: 10:27:01 AM
15: * To change this template use File | Settings | File Templates.
16: */
17: public class CreateFormInteractionAction extends BaseInteractionAction {
18:
19: private StructuredArtifactDefinitionManager structuredArtifactDefinitionManager;
20:
21: public CreateFormInteractionAction(
22: StructuredArtifactDefinitionManager structuredArtifactDefinitionManager,
23: String id, ActionType actionType, String typeId,
24: String helperId, List requiredPropertyKeys) {
25: super (id, actionType, typeId, helperId, requiredPropertyKeys);
26: this .structuredArtifactDefinitionManager = structuredArtifactDefinitionManager;
27: }
28:
29: /* (non-Javadoc)
30: * @see org.sakaiproject.content.api.ResourceToolAction#available(java.lang.String)
31: */
32: public boolean available(ContentEntity entity) {
33: return getStructuredArtifactDefinitionManager().hasHomes();
34: }
35:
36: public StructuredArtifactDefinitionManager getStructuredArtifactDefinitionManager() {
37: return structuredArtifactDefinitionManager;
38: }
39:
40: public void setStructuredArtifactDefinitionManager(
41: StructuredArtifactDefinitionManager structuredArtifactDefinitionManager) {
42: this.structuredArtifactDefinitionManager = structuredArtifactDefinitionManager;
43: }
44: }
|