Except as provided in sections 307 and 359 and as otherwise provided by law, all candidates of political parties, as defined in section 301 of this title, for public offices shall be nominated, and candidates for party offices which, under this title, are required to be elected by the party electors, shall be elected, at primary elections held in accordance with the provisions of this title and in no other manner.