try {
ssup.setFolderAttributeValue(tab.getId(), "externalId", tabExternalId);
ulStore.setStructureStylesheetUserPreferences(staticData.getPerson(),
editedUserProfile.getProfileId(), ssup);
} catch (Exception e) {
throw new PortalException("Failed to set the 'externalId' attribute of tab '" +
tabId + "' in StructureStylesheetUserPreferences", e);
}
} else {
// tabExternalId is not specified... need to remove it if present...
if (ssup.getDefinedFolderAttributeValue(tab.getId(), "externalId") != null) {
// It *is* previously specified, and being removed...
try {
// Setting to null and saving will remove it from DB.
ssup.setFolderAttributeValue(tab.getId(), "externalId", null);
ulStore.setStructureStylesheetUserPreferences(staticData.getPerson(),
editedUserProfile.getProfileId(), ssup);
} catch (Exception e) {
throw new PortalException("Failed to remove the 'externalId' attribute of tab '" +
tabId + "' in StructureStylesheetUserPreferences", e);
}
}
}
} else {
throw new PortalException("attempt.to.rename.immutable.tab" +tabId);
}
saveLayout(false);
}