Search in sources :

Example 1 with PersistentSet

use of org.apache.derby.iapi.services.property.PersistentSet in project derby by apache.

the class GenericAuthorizer method userOnAccessList.

private boolean userOnAccessList(String listName) throws StandardException {
    PersistentSet tc = lcc.getTransactionExecute();
    String listS = PropertyUtil.getServiceProperty(tc, listName);
    return IdUtil.idOnList(lcc.getSessionUserId(), listS);
}
Also used : PersistentSet(org.apache.derby.iapi.services.property.PersistentSet)

Example 2 with PersistentSet

use of org.apache.derby.iapi.services.property.PersistentSet in project derby by apache.

the class GenericAuthorizer method getDefaultAccessLevel.

private int getDefaultAccessLevel() throws StandardException {
    PersistentSet tc = lcc.getTransactionExecute();
    String modeS = PropertyUtil.getServiceProperty(tc, Property.DEFAULT_CONNECTION_MODE_PROPERTY);
    if (modeS == null)
        return FULL_ACCESS;
    else if (StringUtil.SQLEqualsIgnoreCase(modeS, Property.NO_ACCESS))
        return NO_ACCESS;
    else if (StringUtil.SQLEqualsIgnoreCase(modeS, Property.READ_ONLY_ACCESS))
        return READ_ACCESS;
    else if (StringUtil.SQLEqualsIgnoreCase(modeS, Property.FULL_ACCESS))
        return FULL_ACCESS;
    else {
        if (SanityManager.DEBUG)
            SanityManager.THROWASSERT("Invalid value for property " + Property.DEFAULT_CONNECTION_MODE_PROPERTY + " " + modeS);
        return FULL_ACCESS;
    }
}
Also used : PersistentSet(org.apache.derby.iapi.services.property.PersistentSet)

Example 3 with PersistentSet

use of org.apache.derby.iapi.services.property.PersistentSet in project derby by apache.

the class ClassLoaderLock method getClasspath.

private String getClasspath() throws StandardException {
    ClassFactoryContext cfc = (ClassFactoryContext) getContextOrNull(ClassFactoryContext.CONTEXT_ID);
    PersistentSet ps = cfc.getPersistentSet();
    String classpath = PropertyUtil.getServiceProperty(ps, Property.DATABASE_CLASSPATH);
    // yet have one we make one up.
    if (classpath == null)
        classpath = "";
    return classpath;
}
Also used : ClassFactoryContext(org.apache.derby.iapi.services.loader.ClassFactoryContext) PersistentSet(org.apache.derby.iapi.services.property.PersistentSet)

Aggregations

PersistentSet (org.apache.derby.iapi.services.property.PersistentSet)3 ClassFactoryContext (org.apache.derby.iapi.services.loader.ClassFactoryContext)1