Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To add a new service to repository, create an interface for the service and provide an implementation. This new service needs to extend IRepositoryService. This is a marker interface which identifies this new service as a repository service. Once the service is defined, it needs to register itself in the repository's implementation. In future we can have this registration done using spring which will even more pluggableconfigurable.

Adding service in detail

...

Code Block
java
java
titleIAclManager.java
public interface IAclManager extends IRepositoryService{
  /**
   * Get the Permissions of a repository object.
   *
   * @param Object Id of the repository object
   * @param forceParentInheriting retrieve the effective ACLs as if 'inherit from parent' were true
   *
   * @return The permissions.
   * @throws KettleException in case something goes horribly wrong
   */
  public ObjectAcl getAcl(ObjectId id, boolean forceParentInheriting) throws KettleException;

  /**
   * Set the Permissions of a repository element.
   *
   * @param Acl object that needs to be set.
   * @param Object Id of a file for which the acl are being set.
   *
   * @throws KettleException in case something goes horribly wrong
   */
  public  void setAcl(ObjectId id, ObjectAcl aclObject) throws KettleException;

}


One important item to note in this interface that it extends IRepositoryService. This is a marker interface which identifies this service to be a repository service. In a repository's implementation we instantiated the service implementation and register this service with repository.

...