src/snac/server/ServerExecutor.php
/**
     * Sub-Edit Constellation
     *
     * Similar to readConstellation, this method returns a Constellation on the response.  If the client provided
     * an ark id, this constellation is generated by using the EAC-CPF parser.  If the client provided a
     * constellation id, it upgrades the status to "currently editing" and then returns the constellation in the response.
     *
     * @param string[] $input Input array from the Server object
     * @throws \snac\exceptions\SNACPermissionException
     * @return string[] The response to send to the client
     */
Sub-Edit Constellation
Similar to readConstellation, this method returns a Constellation on the response.  If the client provided
an ark id, this constellation is generated by using the EAC-CPF parser.  If the client provided a
constellation id, it upgrades the status to "currently editing" and then returns the constellation in the response.

@param string[] $input Input array from the Server object
@throws \snac\exceptions\SNACPermissionException
@return string[] The response to send to the client
Sub - Edit Constellation Similar to readConstellation this method returns a Constellation on the response . If the client provided an ark id this constellation is generated by using the EAC - CPF parser . If the client provided a constellation id it upgrades the status to " currently editing " and then returns the constellation in the response . @param string [] $input Input array from the Server object @throws \ snac \ exceptions \ SNACPermissionException @return string [] The response to send to the client
public function subEditConstellation(&$input) {
        $this->logger->addDebug("Editing Constellation (Sub)");
        $response = array();
        if (isset($input["constellationid"])) {
            try {
                $this->logger->addDebug("Reading constellation from the database");
                $cId = $input["constellationid"];
                $status = $this->cStore->readConstellationStatus($cId);
                $current = $this->cStore->readConstellation($cId, null, DBUtil::$READ_NRD);
                $inList = false;
                $userList = $this->cStore->listConstellationsWithStatusForUser($this->user, "currently editing");
                foreach ($userList as $item) {
                    if ($item->getID() == $current->getID()) {
                        $inList = true;
                        break;
                    }
                }
                if ($inList) {
                    $constellation = $this->cStore->readConstellation($cId);
                    $this->logger->addDebug("Finished reading constellation from the database");
                    $response["constellation"] = $constellation->toArray();
                    $response["result"] = "success";
                    $this->logger->addDebug("Serialized constellation for output to client");
                } else {
                    throw new \snac\exceptions\SNACPermissionException("Constellation is not currently being edited, so can not sub-edit.  Must be opened in edit first.", 403);
                }
            } catch (\Exception $e) {
                throw $e;
            }
        } else {
            $response["result"] = "failure";
        }
        return $response;
    }
public function subEditConstellation ( & $ input ) { $ this -> logger -> addDebug ( " Editing Constellation (Sub) " ) ; $ response = array ( ) ; if ( isset ( $ input [ " constellationid " ] ) ) { try { $ this -> logger -> addDebug ( " Reading constellation from the database " ) ; $ cId = $ input [ " constellationid " ] ; $ status = $ this -> cStore -> readConstellationStatus ( $ cId ) ; $ current = $ this -> cStore -> readConstellation ( $ cId , null , DBUtil :: $ READ_NRD ) ; $ inList = false ; $ userList = $ this -> cStore -> listConstellationsWithStatusForUser ( $ this -> user , " currently editing " ) ; foreach ( $ userList as $ item ) { if ( $ item -> getID ( ) == $ current -> getID ( ) ) { $ inList = true ; break ; } } if ( $ inList ) { $ constellation = $ this -> cStore -> readConstellation ( $ cId ) ; $ this -> logger -> addDebug ( " Finished reading constellation from the database " ) ; $ response [ " constellation " ] = $ constellation -> toArray ( ) ; $ response [ " result " ] = " success " ; $ this -> logger -> addDebug ( " Serialized constellation for output to client " ) ; } else { throw new \ snac \ exceptions \ SNACPermissionException ( " Constellation is not currently being edited, so can not sub-edit.  Must be opened in edit first. " , 403 ) ; } } catch ( \ Exception $ e ) { throw $ e ; } } else { $ response [ " result " ] = " failure " ; } return $ response ; }
Sub-Edit Constellation
 Similar to readConstellation, this method returns a Constellation on the response.
Sub - Edit Constellation Similar to readConstellation this method returns a Constellation on the response .
// Editing the given constellation id by reading the database // Read the constellation // Should check the list of constellations for the user and only allow editing a "locked editing" constellation // if that constellation is attached to that user.  So, need to loop through the constellations for that user // Read the current summary // Can continue editing this! // read the constellation into response // Leaving a catch block for logging purposes