Package org.apache.derby.iapi.sql.dictionary

Examples of org.apache.derby.iapi.sql.dictionary.RoutinePermsDescriptor


            dd.getSchemaDescriptor( aliasDescriptor.getSchemaUUID(), tc),
            dd);
   
    DataDescriptorGenerator ddg = dd.getDataDescriptorGenerator();

    RoutinePermsDescriptor routinePermsDesc = ddg.newRoutinePermsDescriptor( aliasDescriptor, currentUser);

    dd.startWriting(lcc);
    for( Iterator itr = grantees.iterator(); itr.hasNext();)
    {
      // Keep track to see if any privileges are revoked by a revoke
View Full Code Here


                            colPermsKey.getType(),
                            (FormatableBitSet) null);
    }
    else if( key instanceof RoutinePermsDescriptor)
    {
      RoutinePermsDescriptor routinePermsKey = (RoutinePermsDescriptor) key;
      permissions = dd.getUncachedRoutinePermsDescriptor( routinePermsKey);
      if( permissions == null)
      {
        // The owner has all privileges unless they have been revoked.
        try
        {
          AliasDescriptor ad = dd.getAliasDescriptor( routinePermsKey.getRoutineUUID());
          SchemaDescriptor sd = dd.getSchemaDescriptor( ad.getSchemaUUID(),
                        ConnectionUtil.getCurrentLCC().getTransactionExecute());
          if (sd.isSystemSchema() && !sd.isSchemaWithGrantableRoutines())
            permissions = new RoutinePermsDescriptor( dd,
                                  routinePermsKey.getGrantee(),
                                                                  (String) null,
                                  routinePermsKey.getRoutineUUID(),
                                  true);
          else if( routinePermsKey.getGrantee().equals( sd.getAuthorizationId()))
            permissions = new RoutinePermsDescriptor( dd,
                                  routinePermsKey.getGrantee(),
                                  Authorizer.SYSTEM_AUTHORIZATION_ID,
                                  routinePermsKey.getRoutineUUID(),
                                  true);
        }
        catch( java.sql.SQLException sqle)
        {
          throw StandardException.plainWrapException( sqle);
View Full Code Here

   */
    public boolean isCorrectPermission( PermissionsDescriptor raw )
    {
        if ( (raw == null) || !( raw instanceof RoutinePermsDescriptor) ) { return false; }

        RoutinePermsDescriptor pd = (RoutinePermsDescriptor) raw;
       
        return pd.getHasExecutePermission();
    }
View Full Code Here

  void createRoutinePermPublicDescriptor(
  UUID routineUUID,
  TransactionController tc,
  String authorizationID) throws StandardException
  {
    RoutinePermsDescriptor routinePermDesc =
      new RoutinePermsDescriptor(
        this,
        "PUBLIC",
        authorizationID,
        routineUUID);
View Full Code Here

     * @exception StandardException
     */
    public RoutinePermsDescriptor getRoutinePermissions( UUID routineUUID, String authorizationId)
        throws StandardException
    {
        RoutinePermsDescriptor key = new RoutinePermsDescriptor( this, authorizationId, (String) null, routineUUID);

        return (RoutinePermsDescriptor) getPermissions( key);
    } // end of getRoutinePermissions
View Full Code Here

   
  /* @see org.apache.derby.iapi.sql.dictionary.DataDictionary#getRoutinePermissions */
    public RoutinePermsDescriptor getRoutinePermissions( UUID routinePermsUUID)
    throws StandardException
  {
      RoutinePermsDescriptor key = new RoutinePermsDescriptor( this, routinePermsUUID);
        return getUncachedRoutinePermsDescriptor( key );    
  }
View Full Code Here

  void createRoutinePermPublicDescriptor(
  UUID routineUUID,
  TransactionController tc,
  String authorizationID) throws StandardException
  {
    RoutinePermsDescriptor routinePermDesc =
      new RoutinePermsDescriptor(
        this,
        "PUBLIC",
        authorizationID,
        routineUUID);
View Full Code Here

     * @exception StandardException
     */
    public RoutinePermsDescriptor getRoutinePermissions( UUID routineUUID, String authorizationId)
        throws StandardException
    {
        RoutinePermsDescriptor key = new RoutinePermsDescriptor( this, authorizationId, (String) null, routineUUID);

        return (RoutinePermsDescriptor) getPermissions( key);
    } // end of getRoutinePermissions
View Full Code Here

   
  /* @see org.apache.derby.iapi.sql.dictionary.DataDictionary#getRoutinePermissions */
    public RoutinePermsDescriptor getRoutinePermissions( UUID routinePermsUUID)
    throws StandardException
  {
      RoutinePermsDescriptor key = new RoutinePermsDescriptor( this, routinePermsUUID);
        return getUncachedRoutinePermsDescriptor( key );    
  }
View Full Code Here

  void createRoutinePermPublicDescriptor(
  UUID routineUUID,
  TransactionController tc,
  String authorizationID) throws StandardException
  {
    RoutinePermsDescriptor routinePermDesc =
      new RoutinePermsDescriptor(
        this,
        "PUBLIC",
        authorizationID,
        routineUUID);
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.sql.dictionary.RoutinePermsDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.