1 9 package org.jboss.portal.server.kernel; 10 11 import org.jboss.portal.server.kernel.state.State; 12 13 17 public class CreateMethod extends UpgradeMethod 18 { 19 20 public CreateMethod(Kernel kernel) 21 { 22 super(kernel); 23 } 24 25 protected void checkState(Entry entry) throws TransitionNotPossibleException 26 { 27 entry.machine.create(true); 28 } 29 30 protected boolean doesDependantPreventsInvoke(Entry entry) 31 { 32 return entry.getState() == State.UNREGISTERED || entry.getState() == State.REGISTERED; 33 } 34 35 protected void invokeMethod(Entry entry) throws Exception 36 { 37 entry.implementation.service.create(); 38 entry.machine.create(false); 39 } 40 41 protected void invokeMethodOnDependsOnMe(Entry entry) throws KernelException 42 { 43 if (entry.machine.getState() == State.REGISTERED) 44 { 45 kernel.create(entry.id); 46 } 47 } 48 } 49 | Popular Tags |