* @param coplet the coplet instance data
* @trows ProcessingException if something fails in the creation process
*/
private void createNewInstance(CopletInstanceData coplet)
throws ProcessingException {
ProfileManager profileManager = null;
try {
profileManager =
(ProfileManager) this.manager.lookup(ProfileManager.ROLE);
CopletData copletData = coplet.getCopletData();
LayoutFactory lfac =
(LayoutFactory) this.manager.lookup(LayoutFactory.ROLE);
CopletLayout copletLayout =
(CopletLayout) lfac.newInstance("coplet");
CopletFactory cfac =
(CopletFactory) manager.lookup(CopletFactory.ROLE);
CopletInstanceData newCoplet = cfac.newInstance(copletData);
copletLayout.setCopletInstanceData(newCoplet);
profileManager.register(copletLayout);
NamedItem newItem = new NamedItem();
newItem.setLayout(copletLayout);
CompositeLayout tabLayout =
(CompositeLayout) profileManager.getPortalLayout(
"portalApplications", null);
newItem.setName(getNewInstanceTabName(tabLayout));
tabLayout.addItem(newItem);
} catch (ServiceException ce) {