-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* created subpackages in PHPCR according to spec package hierarchy, moved and adapted files as needed * now all Exceptions defined in JSR-283 are in the package * added some new interfaces and classes TYPO3CR: * created subpackages like in the PHPCR package, moved and adapted files as needed
- Loading branch information
1 parent
5aab652
commit 7d12334
Showing
30 changed files
with
756 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<?php | ||
declare(ENCODING = 'utf-8'); | ||
|
||
/* * | ||
* This script is part of the TYPO3 project - inspiring people to share! * | ||
* * | ||
* TYPO3 is free software; you can redistribute it and/or modify it under * | ||
* the terms of the GNU General Public License version 2 as published by * | ||
* the Free Software Foundation. * | ||
* * | ||
* This script is distributed in the hope that it will be useful, but * | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- * | ||
* TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * | ||
* Public License for more details. * | ||
* */ | ||
|
||
/** | ||
* @package PHPCR | ||
* @version $Id$ | ||
*/ | ||
|
||
/** | ||
* RepositoryFactory is a factory class for Repository implementations. | ||
* | ||
* A concrete implementation of this class must have a zero-argument constructor. | ||
* Repository factories may be installed in an instance of the Java platform as extensions, | ||
* that is, jar files placed into any of the usual extension directories. Factories may | ||
* also be made available by adding them to the applet or application class path or by | ||
* some other platform-specific means. Repository factories are looked up via the current | ||
* thread's context class loader. | ||
* | ||
* A repository factory should identify itself with a factory-configuration file named | ||
* javax.jcr.RepositoryFactory in the resource directory META-INF/services. The file | ||
* should contain a list of fully-qualified concrete repository-factory class names, one | ||
* per line. A line is terminated by any one of a line feed ('\n'), a carriage return | ||
* ('\r'), or a carriage return followed immediately by a line feed. Space and tab | ||
* characters surrounding each name, as well as blank lines, are ignored. The comment | ||
* character is '#' ('#'); on each line all characters following the first comment | ||
* character are ignored. The file must be encoded in UTF-8. | ||
* | ||
* If a particular concrete repository factory class is named in more than one configuration | ||
* file, or is named in the same configuration file more than once, then the duplicates will | ||
* be ignored. The configuration file naming a particular factory need not be in the same jar | ||
* file or other distribution unit as the factory itself. The factory must be accessible from | ||
* the same class loader that was initially queried to locate the configuration file; this is | ||
* not necessarily the class loader that loaded the file. | ||
* | ||
* Examples how to obtain repository instances | ||
* | ||
* Use repository factory based on parameters: | ||
* $parameters = array('address' => 'vendor://localhost:9999/myrepo'); | ||
* $repo = F3_PHPCR_RepositoryFactory::getRepository($parameters); | ||
* | ||
* Get a default repository available in this environment: | ||
* $repo = F3_PHPCR_RepositoryFactory::getRepository(); | ||
* | ||
* Manually instantiate a specific repository factory and connect to the repository: | ||
* $parameters = array('address' => 'vendor://localhost:9999/myrepo'); | ||
* $factory = new F3_TYPO3CR_RepositoryFactory(); | ||
* $repo = $factory->connect($parameters); | ||
* | ||
* @package PHPCR | ||
* @version $Id$ | ||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2 | ||
*/ | ||
abstract class F3_PHPCR_RepositoryFactory { | ||
|
||
/** | ||
* Attempts to establish a connection to a repository described by the given | ||
* parameters. The implementation should return null if it does not understand | ||
* the given parameters. The implementation may also return null if a default | ||
* repository instance is requested (indicated by null parameters) and this | ||
* factory is not able to identify a default repository. | ||
* | ||
* @param array $parameters | ||
* @return F3_PHPCR_RepositoryInterface | ||
* @throws F3_PHPCR_RepositoryException If an implementation is the right factory but has trouble connecting to the repository. | ||
*/ | ||
abstract public function connect(array $parameters); | ||
|
||
/** | ||
* Attempts to establish a connection to a repository using the given parameters. | ||
* If no parameters are given, the first found default repository is returned. | ||
* | ||
* @param array|NULL $parameters string key/value pairs as repository arguments or null if none are provided and a client wishes to connect to a default repository. | ||
* @return F3_PHPCR_RepositoryInterface | ||
* @throws F3_PHPCR_RepositoryException if getRepository fails or if no suitable (default) repository is found. | ||
*/ | ||
static public function getRepository($parameters = NULL) { | ||
|
||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
<?php | ||
declare(ENCODING = 'utf-8'); | ||
|
||
/* * | ||
* This script is part of the TYPO3 project - inspiring people to share! * | ||
* * | ||
* TYPO3 is free software; you can redistribute it and/or modify it under * | ||
* the terms of the GNU General Public License version 2 as published by * | ||
* the Free Software Foundation. * | ||
* * | ||
* This script is distributed in the hope that it will be useful, but * | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- * | ||
* TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * | ||
* Public License for more details. * | ||
* */ | ||
|
||
/** | ||
* @package PHPCR | ||
* @subpackage Lock | ||
* @version $Id$ | ||
*/ | ||
|
||
/** | ||
* Represents a lock placed on an item. | ||
* | ||
* @package PHPCR | ||
* @subpackage Lock | ||
* @version $Id$ | ||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2 | ||
*/ | ||
interface F3_PHPCR_Lock_LockInterface { | ||
|
||
/** | ||
* Returns the value of the jcr:lockOwner property. This is the user ID | ||
* bound to the Session that holds the lock or another implementation- | ||
* dependent string identifying the user. The lock owner's identity is | ||
* only provided for informational purposes. It does not govern who can | ||
* perform an unlock or make changes to the locked nodes; that depends | ||
* entirely upon who the token holder is. | ||
* | ||
* @return string a user ID | ||
*/ | ||
public function getLockOwner(); | ||
|
||
/** | ||
* Returns true if this is a deep lock; false otherwise. | ||
* | ||
* @return boolean | ||
*/ | ||
public function isDeep(); | ||
|
||
/** | ||
* Returns the lock holding node. Note that N.getLock().getNode() (where N | ||
* is a locked node) will only return N if N is the lock holder. If N is in | ||
* the subtree of the lock holder, H, then this call will return H. | ||
* | ||
* @return F3_PHPCR_NodeInterface a Node | ||
*/ | ||
public function getNode(); | ||
|
||
/** | ||
* May return the lock token for this lock. If this lock is open-scoped and | ||
* the current session holds the lock token for this lock, then this method | ||
* will return that lock token. Otherwise this method will return null. | ||
* | ||
* @return string | ||
*/ | ||
public function getLockToken(); | ||
|
||
/** | ||
* Returns true if this Lock object represents a lock that is currently in | ||
* effect. If this lock has been unlocked either explicitly or due to an | ||
* implementation-specific limitation (like a timeout) then it returns false. | ||
* Note that this method is intended for those cases where one is holding a | ||
* Lock Java object and wants to find out whether the lock (the JCR-level | ||
* entity that is attached to the lockable node) that this object originally | ||
* represented still exists. For example, a timeout or explicit unlock will | ||
* remove a lock from a node but the Lock Java object corresponding to that | ||
* lock may still exist, and in that case its isLive method will return false. | ||
* | ||
* @return boolean | ||
* @throws RepositoryException if an error occurs | ||
*/ | ||
public function isLive(); | ||
|
||
/** | ||
* Returns true if this is a session-scoped lock and the scope is bound to the | ||
* current session. Returns false if this is an open-scoped lock or is session- | ||
* scoped but the scope is bound to another session. | ||
* | ||
* @return boolean | ||
*/ | ||
public function isSessionScoped(); | ||
|
||
/** | ||
* Returns true if the current session is the owner of this lock, either because | ||
* it is session-scoped and bound to this session or open-scoped and this session | ||
* currently holds the token for this lock. Returns false otherwise. | ||
* | ||
* @return boolean | ||
*/ | ||
public function isLockOwningSession(); | ||
|
||
/** | ||
* If this lock's time-to-live is governed by a timer, this method resets that | ||
* timer so that the lock does not timeout and expire. If this lock's time-to-live | ||
* is not governed by a timer, then this method has no effect. | ||
* | ||
* @throws F3_PHPCR_Lock_LockException if this Session does not hold the correct lock token for this lock. | ||
* @throws F3_PHPCR_RepositoryException if another error occurs. | ||
*/ | ||
public function refresh(); | ||
|
||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.