Source for file Repository.php

Documentation is available at Repository.php

  1. <?php
  2. /**
  3. * Repository manages Assets of various Types and information about the Assets.
  4. * Assets are created, persisted, and validated by the Repository. When
  5. * initially created, an Asset has an immutable Type and unique Id and its
  6. * validation status is false. In this state, all methods can be called, but
  7. * integrity checks are not enforced. When the Asset and its Records are
  8. * ready to be validated, the validateAsset method checks the Asset and sets
  9. * the validation status. When working with a valid Asset, all methods
  10. * include integrity checks and an exception is thrown if the activity would
  11. * result in an inappropriate state. Optionally, the invalidateAsset method
  12. * can be called to release the requirement for integrity checks, but the
  13. * Asset will not become valid again, until validateAsset is called and the
  14. * entire Asset is checked.
  15. *
  16. * <p>
  17. * OSID Version: 2.0
  18. * </p>
  19. *
  20. * <p>
  21. * Licensed under the {@link org.osid.SidImplementationLicenseMIT MIT}
  22. * O.K.I&#46; OSID Definition License}.
  23. * </p>
  24. *
  25. * @package org.osid.repository
  26. */
  27. class Repository
  28. {
  29. /**
  30. * Update the display name for this Repository.
  31. *
  32. * @param string $displayName
  33. *
  34. * @throws object RepositoryException An exception with one of
  35. * the following messages defined in
  36. * org.osid.repository.RepositoryException may be thrown: {@link }
  37. * org.osid.repository.RepositoryException#OPERATION_FAILED
  38. * OPERATION_FAILED}, {@link }
  39. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  40. * PERMISSION_DENIED}, {@link }
  41. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  42. * CONFIGURATION_ERROR}, {@link }
  43. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  44. * UNIMPLEMENTED}, {@link }
  45. * org.osid.repository.RepositoryException#NULL_ARGUMENT
  46. * NULL_ARGUMENT}
  47. *
  48. * @access public
  49. */
  50. function updateDisplayName ( $displayName ) {
  51. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  52. }
  53.  
  54. /**
  55. * Get the display name for this Repository.
  56. *
  57. * @return string
  58. *
  59. * @throws object RepositoryException An exception with one of
  60. * the following messages defined in
  61. * org.osid.repository.RepositoryException may be thrown: {@link }
  62. * org.osid.repository.RepositoryException#OPERATION_FAILED
  63. * OPERATION_FAILED}, {@link }
  64. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  65. * PERMISSION_DENIED}, {@link }
  66. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  67. * CONFIGURATION_ERROR}, {@link }
  68. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  69. * UNIMPLEMENTED}
  70. *
  71. * @access public
  72. */
  73. function getDisplayName () {
  74. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  75. }
  76.  
  77. /**
  78. * Get the unique Id for this Repository.
  79. *
  80. * @return object Id
  81. *
  82. * @throws object RepositoryException An exception with one of
  83. * the following messages defined in
  84. * org.osid.repository.RepositoryException may be thrown: {@link }
  85. * org.osid.repository.RepositoryException#OPERATION_FAILED
  86. * OPERATION_FAILED}, {@link }
  87. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  88. * PERMISSION_DENIED}, {@link }
  89. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  90. * CONFIGURATION_ERROR}, {@link }
  91. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  92. * UNIMPLEMENTED}
  93. *
  94. * @access public
  95. */
  96. function getId () {
  97. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  98. }
  99.  
  100. /**
  101. * Get the RepositoryType of this Repository.
  102. *
  103. * @return object Type
  104. *
  105. * @throws object RepositoryException An exception with one of
  106. * the following messages defined in
  107. * org.osid.repository.RepositoryException may be thrown: {@link }
  108. * org.osid.repository.RepositoryException#OPERATION_FAILED
  109. * OPERATION_FAILED}, {@link }
  110. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  111. * PERMISSION_DENIED}, {@link }
  112. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  113. * CONFIGURATION_ERROR}, {@link }
  114. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  115. * UNIMPLEMENTED}
  116. *
  117. * @access public
  118. */
  119. function getType () {
  120. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  121. }
  122.  
  123. /**
  124. * Get the description for this Repository.
  125. *
  126. * @return string
  127. *
  128. * @throws object RepositoryException An exception with one of
  129. * the following messages defined in
  130. * org.osid.repository.RepositoryException may be thrown: {@link }
  131. * org.osid.repository.RepositoryException#OPERATION_FAILED
  132. * OPERATION_FAILED}, {@link }
  133. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  134. * PERMISSION_DENIED}, {@link }
  135. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  136. * CONFIGURATION_ERROR}, {@link }
  137. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  138. * UNIMPLEMENTED}
  139. *
  140. * @access public
  141. */
  142. function getDescription () {
  143. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  144. }
  145.  
  146. /**
  147. * Update the description for this Repository.
  148. *
  149. * @param string $description
  150. *
  151. * @throws object RepositoryException An exception with one of
  152. * the following messages defined in
  153. * org.osid.repository.RepositoryException may be thrown: {@link }
  154. * org.osid.repository.RepositoryException#OPERATION_FAILED
  155. * OPERATION_FAILED}, {@link }
  156. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  157. * PERMISSION_DENIED}, {@link }
  158. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  159. * CONFIGURATION_ERROR}, {@link }
  160. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  161. * UNIMPLEMENTED}, {@link }
  162. * org.osid.repository.RepositoryException#NULL_ARGUMENT
  163. * NULL_ARGUMENT}
  164. *
  165. * @access public
  166. */
  167. function updateDescription ( $description ) {
  168. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  169. }
  170.  
  171. /**
  172. * Create a new Asset of this AssetType in this Repository. The
  173. * implementation of this method sets the Id for the new object.
  174. *
  175. * @param string $displayName
  176. * @param string $description
  177. * @param object Type $assetType
  178. *
  179. * @return object Asset
  180. *
  181. * @throws object RepositoryException An exception with one of
  182. * the following messages defined in
  183. * org.osid.repository.RepositoryException may be thrown: {@link }
  184. * org.osid.repository.RepositoryException#OPERATION_FAILED
  185. * OPERATION_FAILED}, {@link }
  186. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  187. * PERMISSION_DENIED}, {@link }
  188. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  189. * CONFIGURATION_ERROR}, {@link }
  190. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  191. * UNIMPLEMENTED}, {@link }
  192. * org.osid.repository.RepositoryException#NULL_ARGUMENT
  193. * NULL_ARGUMENT}, {@link }
  194. * org.osid.repository.RepositoryException#UNKNOWN_TYPE
  195. * UNKNOWN_TYPE}
  196. *
  197. * @access public
  198. */
  199. function createAsset ( $displayName, $description, $assetType ) {
  200. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  201. }
  202.  
  203. /**
  204. * Delete an Asset from this Repository.
  205. *
  206. * @param object Id $assetId
  207. *
  208. * @throws object RepositoryException An exception with one of
  209. * the following messages defined in
  210. * org.osid.repository.RepositoryException may be thrown: {@link }
  211. * org.osid.repository.RepositoryException#OPERATION_FAILED
  212. * OPERATION_FAILED}, {@link }
  213. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  214. * PERMISSION_DENIED}, {@link }
  215. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  216. * CONFIGURATION_ERROR}, {@link }
  217. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  218. * UNIMPLEMENTED}, {@link }
  219. * org.osid.repository.RepositoryException#NULL_ARGUMENT
  220. * NULL_ARGUMENT}, {@link }
  221. * org.osid.repository.RepositoryException#UNKNOWN_ID UNKNOWN_ID}
  222. *
  223. * @access public
  224. */
  225. function deleteAsset ( $assetId ) {
  226. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  227. }
  228.  
  229. /**
  230. * Get all the Assets in this Repository. Iterators return a set, one at a
  231. * time.
  232. *
  233. * @return object AssetIterator
  234. *
  235. * @throws object RepositoryException An exception with one of
  236. * the following messages defined in
  237. * org.osid.repository.RepositoryException may be thrown: {@link }
  238. * org.osid.repository.RepositoryException#OPERATION_FAILED
  239. * OPERATION_FAILED}, {@link }
  240. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  241. * PERMISSION_DENIED}, {@link }
  242. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  243. * CONFIGURATION_ERROR}, {@link }
  244. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  245. * UNIMPLEMENTED}
  246. *
  247. * @access public
  248. */
  249. function getAssets () {
  250. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  251. }
  252.  
  253. /**
  254. * Get all the Assets of the specified AssetType in this Asset. Iterators
  255. * return a set, one at a time.
  256. *
  257. * @param object Type $assetType
  258. *
  259. * @return object AssetIterator
  260. *
  261. * @throws object RepositoryException An exception with one of
  262. * the following messages defined in
  263. * org.osid.repository.RepositoryException may be thrown: {@link }
  264. * org.osid.repository.RepositoryException#OPERATION_FAILED
  265. * OPERATION_FAILED}, {@link }
  266. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  267. * PERMISSION_DENIED}, {@link }
  268. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  269. * CONFIGURATION_ERROR}, {@link }
  270. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  271. * UNIMPLEMENTED}, {@link }
  272. * org.osid.repository.RepositoryException#NULL_ARGUMENT
  273. * NULL_ARGUMENT}, {@link }
  274. * org.osid.repository.RepositoryException#UNKNOWN_TYPE
  275. * UNKNOWN_TYPE}
  276. *
  277. * @access public
  278. */
  279. function getAssetsByType ( $assetType ) {
  280. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  281. }
  282.  
  283. /**
  284. * Get all the AssetTypes in this Repository. AssetTypes are used to
  285. * categorize Assets. Iterators return a set, one at a time.
  286. *
  287. * @return object TypeIterator
  288. *
  289. * @throws object RepositoryException An exception with one of
  290. * the following messages defined in
  291. * org.osid.repository.RepositoryException may be thrown: {@link }
  292. * org.osid.repository.RepositoryException#OPERATION_FAILED
  293. * OPERATION_FAILED}, {@link }
  294. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  295. * PERMISSION_DENIED}, {@link }
  296. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  297. * CONFIGURATION_ERROR}, {@link }
  298. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  299. * UNIMPLEMENTED}
  300. *
  301. * @access public
  302. */
  303. function getAssetTypes () {
  304. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  305. }
  306.  
  307. /**
  308. * Get the Properties of this Type associated with this Repository.
  309. *
  310. * @param object Type $propertiesType
  311. *
  312. * @return object Properties
  313. *
  314. * @throws object RepositoryException An exception with one of
  315. * the following messages defined in
  316. * org.osid.repository.RepositoryException may be thrown: {@link }
  317. * org.osid.repository.RepositoryException#OPERATION_FAILED
  318. * OPERATION_FAILED}, {@link }
  319. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  320. * PERMISSION_DENIED}, {@link }
  321. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  322. * CONFIGURATION_ERROR}, {@link }
  323. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  324. * UNIMPLEMENTED}, {@link }
  325. * org.osid.repository.RepositoryException#NULL_ARGUMENT
  326. * NULL_ARGUMENT}, {@link }
  327. * org.osid.repository.RepositoryException#UNKNOWN_TYPE
  328. * UNKNOWN_TYPE}
  329. *
  330. * @access public
  331. */
  332. function getPropertiesByType ( $propertiesType ) {
  333. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  334. }
  335.  
  336. /**
  337. * Get all the Property Types for Repository.
  338. *
  339. * @return object TypeIterator
  340. *
  341. * @throws object RepositoryException An exception with one of
  342. * the following messages defined in
  343. * org.osid.repository.RepositoryException may be thrown: {@link }
  344. * org.osid.repository.RepositoryException#OPERATION_FAILED
  345. * OPERATION_FAILED}, {@link }
  346. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  347. * PERMISSION_DENIED}, {@link }
  348. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  349. * CONFIGURATION_ERROR}, {@link }
  350. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  351. * UNIMPLEMENTED}
  352. *
  353. * @access public
  354. */
  355. function getPropertyTypes () {
  356. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  357. }
  358.  
  359. /**
  360. * Get the Properties associated with this Repository.
  361. *
  362. * @return object PropertiesIterator
  363. *
  364. * @throws object RepositoryException An exception with one of
  365. * the following messages defined in
  366. * org.osid.repository.RepositoryException may be thrown: {@link }
  367. * org.osid.repository.RepositoryException#OPERATION_FAILED
  368. * OPERATION_FAILED}, {@link }
  369. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  370. * PERMISSION_DENIED}, {@link }
  371. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  372. * CONFIGURATION_ERROR}, {@link }
  373. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  374. * UNIMPLEMENTED}
  375. *
  376. * @access public
  377. */
  378. function getProperties () {
  379. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  380. }
  381.  
  382. /**
  383. * Get all the RecordStructures in this Repository. RecordStructures are
  384. * used to categorize information about Assets. Iterators return a set,
  385. * one at a time.
  386. *
  387. * @return object RecordStructureIterator
  388. *
  389. * @throws object RepositoryException An exception with one of
  390. * the following messages defined in
  391. * org.osid.repository.RepositoryException may be thrown: {@link }
  392. * org.osid.repository.RepositoryException#OPERATION_FAILED
  393. * OPERATION_FAILED}, {@link }
  394. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  395. * PERMISSION_DENIED}, {@link }
  396. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  397. * CONFIGURATION_ERROR}, {@link }
  398. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  399. * UNIMPLEMENTED}
  400. *
  401. * @access public
  402. */
  403. function getRecordStructures () {
  404. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  405. }
  406.  
  407. /**
  408. * Get all the RecordStructures with the specified RecordStructureType in
  409. * this Repository. RecordStructures are used to categorize information
  410. * about Assets. Iterators return a set, one at a time.
  411. *
  412. * @param object Type $recordStructureType
  413. *
  414. * @return object RecordStructureIterator
  415. *
  416. * @throws object RepositoryException An exception with one of
  417. * the following messages defined in
  418. * org.osid.repository.RepositoryException may be thrown: {@link }
  419. * org.osid.repository.RepositoryException#OPERATION_FAILED
  420. * OPERATION_FAILED}, {@link }
  421. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  422. * PERMISSION_DENIED}, {@link }
  423. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  424. * CONFIGURATION_ERROR}, {@link }
  425. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  426. * UNIMPLEMENTED}
  427. *
  428. * @access public
  429. */
  430. function getRecordStructuresByType ( $recordStructureType ) {
  431. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  432. }
  433.  
  434. /**
  435. * Get the RecordStructures that this AssetType must support.
  436. * RecordStructures are used to categorize information about Assets.
  437. * Iterators return a set, one at a time.
  438. *
  439. * @param object Type $assetType
  440. *
  441. * @return object RecordStructureIterator
  442. *
  443. * @throws object RepositoryException An exception with one of
  444. * the following messages defined in
  445. * org.osid.repository.RepositoryException may be thrown: {@link }
  446. * org.osid.repository.RepositoryException#OPERATION_FAILED
  447. * OPERATION_FAILED}, {@link }
  448. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  449. * PERMISSION_DENIED}, {@link }
  450. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  451. * CONFIGURATION_ERROR}, {@link }
  452. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  453. * UNIMPLEMENTED}, {@link }
  454. * org.osid.repository.RepositoryException#NULL_ARGUMENT
  455. * NULL_ARGUMENT}, {@link }
  456. * org.osid.repository.RepositoryException#UNKNOWN_TYPE
  457. * UNKNOWN_TYPE}
  458. *
  459. * @access public
  460. */
  461. function getMandatoryRecordStructures ( $assetType ) {
  462. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  463. }
  464.  
  465. /**
  466. * Get all the SearchTypes supported by this Repository. Iterators return
  467. * a set, one at a time.
  468. *
  469. * @return object TypeIterator
  470. *
  471. * @throws object RepositoryException An exception with one of
  472. * the following messages defined in
  473. * org.osid.repository.RepositoryException may be thrown: {@link }
  474. * org.osid.repository.RepositoryException#OPERATION_FAILED
  475. * OPERATION_FAILED}, {@link }
  476. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  477. * PERMISSION_DENIED}, {@link }
  478. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  479. * CONFIGURATION_ERROR}, {@link }
  480. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  481. * UNIMPLEMENTED}
  482. *
  483. * @access public
  484. */
  485. function getSearchTypes () {
  486. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  487. }
  488.  
  489. /**
  490. * Get all the StatusTypes supported by this Repository. Iterators return
  491. * a set, one at a time.
  492. *
  493. * @return object TypeIterator
  494. *
  495. * @throws object RepositoryException An exception with one of
  496. * the following messages defined in
  497. * org.osid.repository.RepositoryException may be thrown: {@link }
  498. * org.osid.repository.RepositoryException#OPERATION_FAILED
  499. * OPERATION_FAILED}, {@link }
  500. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  501. * PERMISSION_DENIED}, {@link }
  502. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  503. * CONFIGURATION_ERROR}, {@link }
  504. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  505. * UNIMPLEMENTED}
  506. *
  507. * @access public
  508. */
  509. function getStatusTypes () {
  510. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  511. }
  512.  
  513. /**
  514. * Get the StatusType of the Asset with the specified unique Id.
  515. *
  516. * @param object Id $assetId
  517. *
  518. * @return object Type
  519. *
  520. * @throws object RepositoryException An exception with one of
  521. * the following messages defined in
  522. * org.osid.repository.RepositoryException may be thrown: {@link }
  523. * org.osid.repository.RepositoryException#OPERATION_FAILED
  524. * OPERATION_FAILED}, {@link }
  525. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  526. * PERMISSION_DENIED}, {@link }
  527. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  528. * CONFIGURATION_ERROR}, {@link }
  529. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  530. * UNIMPLEMENTED}, {@link }
  531. * org.osid.repository.RepositoryException#NULL_ARGUMENT
  532. * NULL_ARGUMENT}, {@link }
  533. * org.osid.repository.RepositoryException#UNKNOWN_ID UNKNOWN_ID}
  534. *
  535. * @access public
  536. */
  537. function getStatus ( $assetId ) {
  538. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  539. }
  540.  
  541. /**
  542. * Validate all the Records for an Asset and set its status Type
  543. * accordingly. If the Asset is valid, return true; otherwise return
  544. * false. The implementation may throw an Exception for any validation
  545. * failures and use the Exception's message to identify specific causes.
  546. *
  547. * @param object Id $assetId
  548. *
  549. * @return boolean
  550. *
  551. * @throws object RepositoryException An exception with one of
  552. * the following messages defined in
  553. * org.osid.repository.RepositoryException may be thrown: {@link }
  554. * org.osid.repository.RepositoryException#OPERATION_FAILED
  555. * OPERATION_FAILED}, {@link }
  556. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  557. * PERMISSION_DENIED}, {@link }
  558. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  559. * CONFIGURATION_ERROR}, {@link }
  560. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  561. * UNIMPLEMENTED}, {@link }
  562. * org.osid.repository.RepositoryException#NULL_ARGUMENT
  563. * NULL_ARGUMENT}, {@link }
  564. * org.osid.repository.RepositoryException#UNKNOWN_ID UNKNOWN_ID}
  565. *
  566. * @access public
  567. */
  568. function validateAsset ( $assetId ) {
  569. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  570. }
  571.  
  572. /**
  573. * Set the Asset's status Type accordingly and relax validation checking
  574. * when creating Records and Parts or updating Parts' values.
  575. *
  576. * @param object Id $assetId
  577. *
  578. * @throws object RepositoryException An exception with one of
  579. * the following messages defined in
  580. * org.osid.repository.RepositoryException may be thrown: {@link }
  581. * org.osid.repository.RepositoryException#OPERATION_FAILED
  582. * OPERATION_FAILED}, {@link }
  583. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  584. * PERMISSION_DENIED}, {@link }
  585. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  586. * CONFIGURATION_ERROR}, {@link }
  587. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  588. * UNIMPLEMENTED}, {@link }
  589. * org.osid.repository.RepositoryException#NULL_ARGUMENT
  590. * NULL_ARGUMENT}, {@link }
  591. * org.osid.repository.RepositoryException#UNKNOWN_ID UNKNOWN_ID}
  592. *
  593. * @access public
  594. */
  595. function invalidateAsset ( $assetId ) {
  596. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  597. }
  598.  
  599. /**
  600. * Get the Asset with the specified unique Id.
  601. *
  602. * @param object Id $assetId
  603. *
  604. * @return object Asset
  605. *
  606. * @throws object RepositoryException An exception with one of
  607. * the following messages defined in
  608. * org.osid.repository.RepositoryException may be thrown: {@link }
  609. * org.osid.repository.RepositoryException#OPERATION_FAILED
  610. * OPERATION_FAILED}, {@link }
  611. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  612. * PERMISSION_DENIED}, {@link }
  613. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  614. * CONFIGURATION_ERROR}, {@link }
  615. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  616. * UNIMPLEMENTED}, {@link }
  617. * org.osid.repository.RepositoryException#NULL_ARGUMENT
  618. * NULL_ARGUMENT}, {@link }
  619. * org.osid.repository.RepositoryException#UNKNOWN_ID UNKNOWN_ID}
  620. *
  621. * @access public
  622. */
  623. function getAsset ( $assetId ) {
  624. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  625. }
  626.  
  627. /**
  628. * Get the Asset with the specified unique Id that is appropriate for the
  629. * date specified. The specified date allows a Repository implementation
  630. * to support Asset versioning.
  631. *
  632. * @param object Id $assetId
  633. * @param int $date
  634. *
  635. * @return object Asset
  636. *
  637. * @throws object RepositoryException An exception with one of
  638. * the following messages defined in
  639. * org.osid.repository.RepositoryException may be thrown: {@link }
  640. * org.osid.repository.RepositoryException#OPERATION_FAILED
  641. * OPERATION_FAILED}, {@link }
  642. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  643. * PERMISSION_DENIED}, {@link }
  644. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  645. * CONFIGURATION_ERROR}, {@link }
  646. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  647. * UNIMPLEMENTED}, {@link }
  648. * org.osid.repository.RepositoryException#NULL_ARGUMENT
  649. * NULL_ARGUMENT}, {@link }
  650. * org.osid.repository.RepositoryException#NO_OBJECT_WITH_THIS_DATE
  651. * NO_OBJECT_WITH_THIS_DATE}
  652. *
  653. * @access public
  654. */
  655. function getAssetByDate ( $assetId, $date ) {
  656. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  657. }
  658.  
  659. /**
  660. * Get all the dates for the Asset with the specified unique Id. These
  661. * dates allows a Repository implementation to support Asset versioning.
  662. *
  663. * @param object Id $assetId
  664. *
  665. * @return object LongValueIterator
  666. *
  667. * @throws object RepositoryException An exception with one of
  668. * the following messages defined in
  669. * org.osid.repository.RepositoryException may be thrown: {@link }
  670. * org.osid.repository.RepositoryException#OPERATION_FAILED
  671. * OPERATION_FAILED}, {@link }
  672. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  673. * PERMISSION_DENIED}, {@link }
  674. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  675. * CONFIGURATION_ERROR}, {@link }
  676. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  677. * UNIMPLEMENTED}, {@link }
  678. * org.osid.repository.RepositoryException#NULL_ARGUMENT
  679. * NULL_ARGUMENT}
  680. *
  681. * @access public
  682. */
  683. function getAssetDates ( $assetId ) {
  684. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  685. }
  686.  
  687. /**
  688. * Perform a search of the specified Type and get all the Assets that
  689. * satisfy the SearchCriteria. Iterators return a set, one at a time.
  690. *
  691. * @param object mixed $searchCriteria (original type: java.io.Serializable)
  692. * @param object Type $searchType
  693. * @param object Properties $searchProperties
  694. *
  695. * @return object AssetIterator
  696. *
  697. * @throws object RepositoryException An exception with one of
  698. * the following messages defined in
  699. * org.osid.repository.RepositoryException may be thrown: {@link }
  700. * org.osid.repository.RepositoryException#OPERATION_FAILED
  701. * OPERATION_FAILED}, {@link }
  702. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  703. * PERMISSION_DENIED}, {@link }
  704. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  705. * CONFIGURATION_ERROR}, {@link }
  706. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  707. * UNIMPLEMENTED}, {@link }
  708. * org.osid.repository.RepositoryException#NULL_ARGUMENT
  709. * NULL_ARGUMENT}, {@link }
  710. * org.osid.repository.RepositoryException#UNKNOWN_TYPE
  711. * UNKNOWN_TYPE}
  712. *
  713. * @access public
  714. */
  715. function getAssetsBySearch ( $searchCriteria, $searchType, $searchProperties ) {
  716. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  717. }
  718.  
  719. /**
  720. * Create a copy of an Asset. The Id, AssetType, and Repository for the
  721. * new Asset is set by the implementation. All Records are similarly
  722. * copied.
  723. *
  724. * @param object Asset $asset
  725. *
  726. * @return object Id
  727. *
  728. * @throws object RepositoryException An exception with one of
  729. * the following messages defined in
  730. * org.osid.repository.RepositoryException may be thrown: {@link }
  731. * org.osid.repository.RepositoryException#OPERATION_FAILED
  732. * OPERATION_FAILED}, {@link }
  733. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  734. * PERMISSION_DENIED}, {@link }
  735. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  736. * CONFIGURATION_ERROR}, {@link }
  737. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  738. * UNIMPLEMENTED}, {@link }
  739. * org.osid.repository.RepositoryException#NULL_ARGUMENT
  740. * NULL_ARGUMENT}, {@link }
  741. * org.osid.repository.RepositoryException#UNKNOWN_ID UNKNOWN_ID}
  742. *
  743. * @access public
  744. */
  745. function copyAsset ( $asset ) {
  746. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  747. }
  748.  
  749. /**
  750. * This method indicates whether this implementation supports Repository
  751. * methods getAssetsDates() and getAssetByDate()
  752. *
  753. * @return boolean
  754. *
  755. * @throws object RepositoryException An exception with one of
  756. * the following messages defined in
  757. * org.osid.repository.RepositoryException may be thrown: {@link }
  758. * org.osid.repository.RepositoryException#OPERATION_FAILED
  759. * OPERATION_FAILED}, {@link }
  760. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  761. * PERMISSION_DENIED}, {@link }
  762. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  763. * CONFIGURATION_ERROR}, {@link }
  764. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  765. * UNIMPLEMENTED}
  766. *
  767. * @access public
  768. */
  769. function supportsVersioning () {
  770. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  771. }
  772.  
  773. /**
  774. * This method indicates whether this implementation supports Repository
  775. * methods: copyAsset, deleteAsset, invalidateAsset, updateDescription,
  776. * updateDisplayName. Asset methods: addAsset, copyRecordStructure,
  777. * createRecord, deleteRecord, inheritRecordStructure, removeAsset,
  778. * updateContent, updateDescription, updateDisplayName,
  779. * updateEffectiveDate, updateExpirationDate. Part methods: createPart,
  780. * deletePart, updateDisplayName, updateValue. PartStructure methods:
  781. * updateDisplayName, validatePart. Record methods: createPart,
  782. * deletePart, updateDisplayName. RecordStructure methods:
  783. * updateDisplayName, validateRecord.
  784. *
  785. * @return boolean
  786. *
  787. * @throws object RepositoryException An exception with one of
  788. * the following messages defined in
  789. * org.osid.repository.RepositoryException may be thrown: {@link }
  790. * org.osid.repository.RepositoryException#OPERATION_FAILED
  791. * OPERATION_FAILED}, {@link }
  792. * org.osid.repository.RepositoryException#PERMISSION_DENIED
  793. * PERMISSION_DENIED}, {@link }
  794. * org.osid.repository.RepositoryException#CONFIGURATION_ERROR
  795. * CONFIGURATION_ERROR}, {@link }
  796. * org.osid.repository.RepositoryException#UNIMPLEMENTED
  797. * UNIMPLEMENTED}
  798. *
  799. * @access public
  800. */
  801. function supportsUpdate () {
  802. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  803. }
  804. }
  805.  
  806. ?>

Documentation generated on Wed, 19 Sep 2007 10:25:58 -0400 by phpDocumentor 1.3.0RC3