ID = getDLS().getNextStructDirectiveId(person); } catch (Exception e) { throw new PortalException(
/** * Create, append to the passed in position set, and return a position element that references * the passed in elementID. */ private static Element createAndAppendPosition( String elementID, Element positions, IPerson person) throws PortalException { if (LOG.isDebugEnabled()) LOG.debug("Adding Position Set entry " + elementID + "."); String ID = null; try { ID = getDLS().getNextStructDirectiveId(person); } catch (Exception e) { throw new PortalException( "Exception encountered while " + "generating new position node " + "Id for userId=" + person.getID(), e); } Document plf = positions.getOwnerDocument(); Element position = plf.createElement(Constants.ELM_POSITION); position.setAttribute(Constants.ATT_TYPE, Constants.ELM_POSITION); position.setAttribute(Constants.ATT_ID, ID); position.setAttributeNS(Constants.NS_URI, Constants.ATT_NAME, elementID); positions.appendChild(position); return position; }
/** * Get the delete set if any stored in the root of the document or create it is passed in create * flag is true. */ private static Element getDeleteSet(Document plf, IPerson person, boolean create) throws PortalException { Node root = plf.getDocumentElement(); Node child = root.getFirstChild(); while (child != null) { if (child.getNodeName().equals(Constants.ELM_DELETE_SET)) return (Element) child; child = child.getNextSibling(); } if (create == false) return null; String ID = null; try { ID = getDLS().getNextStructDirectiveId(person); } catch (Exception e) { throw new PortalException( "Exception encountered while " + "generating new delete set node " + "Id for userId=" + person.getID(), e); } Element delSet = plf.createElement(Constants.ELM_DELETE_SET); delSet.setAttribute(Constants.ATT_TYPE, Constants.ELM_DELETE_SET); delSet.setAttribute(Constants.ATT_ID, ID); root.appendChild(delSet); return delSet; }
/** * Get the edit set if any stored in the passed in node. If not found and if the create flag is * true then create a new edit set and add it as a child to the passed in node. Then return it. */ private static Element getEditSet(Element node, Document plf, IPerson person, boolean create) throws PortalException { Node child = node.getFirstChild(); while (child != null) { if (child.getNodeName().equals(Constants.ELM_EDIT_SET)) return (Element) child; child = child.getNextSibling(); } if (create == false) return null; String ID = null; try { ID = getDLS().getNextStructDirectiveId(person); } catch (Exception e) { throw new PortalException( "Exception encountered while " + "generating new edit set node " + "Id for userId=" + person.getID(), e); } Element editSet = plf.createElement(Constants.ELM_EDIT_SET); editSet.setAttribute(Constants.ATT_TYPE, Constants.ELM_EDIT_SET); editSet.setAttribute(Constants.ATT_ID, ID); node.appendChild(editSet); return editSet; }
ID = getDLS().getNextStructDirectiveId(person); } catch (Exception e) { throw new PortalException(
ID = getDLS().getNextStructDirectiveId(person); } catch (Exception e) { throw new PortalException(
ID = getDLS().getNextStructDirectiveId(person); } catch (Exception e) { throw new PortalException(
ID = getDLS().getNextStructDirectiveId(person); } catch (Exception e) { throw new PortalException(