private static void addParmEditDirective ( String targetID , String name , String value , IPerson person , Document plf , Element parmSet ) throws PortalException { String ID = null ; try { ID = getDLS ( ) . getNextStructDirectiveId ( person ) ; } catch ( Exception e ) { throw new PortalException ( "Exception encountered while " + "generating new parameter edit node " + "Id for userId=" + person . getID ( ) , e ) ; } Element parm = plf . createElement ( Constants . ELM_PARM_EDIT ) ; parm . setAttribute ( Constants . ATT_TYPE , Constants . ELM_PARM_EDIT ) ; parm . setAttribute ( Constants . ATT_ID , ID ) ; parm . setIdAttribute ( Constants . ATT_ID , true ) ; parm . setAttributeNS ( Constants . NS_URI , Constants . ATT_TARGET , targetID ) ; parm . setAttribute ( Constants . ATT_NAME , name ) ; parm . setAttribute ( Constants . ATT_USER_VALUE , value ) ; parmSet . appendChild ( parm ) ; }
This method does the actual work of adding a newly created parameter edit and adding it to the parameter edits set .