public ActivityContextInterface getActivityContextInterface( ProfileTableActivity profileTableActivity) throws NullPointerException, TransactionRequiredLocalException, UnrecognizedActivityException, FactoryException { if (profileTableActivity == null || profileTableActivity.getProfileTableName() == null) { throw new NullPointerException("null profile table activity"); } serviceContainer.getTransactionManager().mandateTransaction(); ProfileTableImpl profileTableImpl = null; try { // check if this is an assigned profile table // name. profileTableImpl = profileManagementImpl.getProfileTable(profileTableActivity.getProfileTableName()); } catch (UnrecognizedProfileTableNameException e) { throw new UnrecognizedActivityException(profileTableActivity.getProfileTableName(),e); } ActivityContext ac = profileTableImpl.getActivityContext(); if (ac == null) { throw new UnrecognizedActivityException("No resource for: "+profileTableActivity.getProfileTableName(),profileTableActivity); } return ac.getActivityContextInterface(); } }
public ActivityContextInterface getActivityContextInterface( ProfileTableActivity profileTableActivity) throws NullPointerException, TransactionRequiredLocalException, UnrecognizedActivityException, FactoryException { if ( profileTableActivity == null || profileTableActivity.getProfileTableName() == null) { throw new NullPointerException("null profile table activity"); } SleeContainer serviceContainer = getServiceContainer(); SleeContainer.getTransactionManager().mandateTransaction(); try { // check if this is an assigned profile table // name. SleeProfileManager.getInstance().profileTableExists(profileTableActivity.getProfileTableName()); } catch (SystemException e) { throw new FactoryException(e.getMessage()); } String acid = serviceContainer.getActivityContextFactory().getActivityContextId(profileTableActivity); ActivityContextInterfaceImpl acii = new ActivityContextInterfaceImpl(serviceContainer, acid ); return acii; }
.removeProfileAfterTableActivityEnd( ((ProfileTableActivity) ac .getActivity()).getProfileTableName());