public final class PermissionImpl extends RelationalObjectImpl implements Permission
RelationalObject.Filter
LOGGER, VALIDATE_INITIAL_STATE
index, path
DEFAULT_ALLOW_ALTER, DEFAULT_ALLOW_CREATE, DEFAULT_ALLOW_DELETE, DEFAULT_ALLOW_EXECUTE, DEFAULT_ALLOW_LANGUAGE, DEFAULT_ALLOW_READ, DEFAULT_ALLOW_UPDATE, IDENTIFIER, NO_PERMISSIONS, RESOLVER, TYPE_ID
DDL_QNAMES_FILTER, DEFAULT_FILTERS, JCR_FILTER, NO_FILTERS, NT_FILTER, RESIDUAL_FILTER
EMPTY_ARRAY
AMPERSAND, AT, BR, CLASS, CLOSE_ANGLE_BRACKET, CLOSE_BRACE, CLOSE_BRACKET, CLOSE_PRE_CMT, CLOSE_PRE_TAG, CLOSE_SQUARE_BRACKET, COLON, COMMA, CONNECTION_SUFFIX, CURRENT_FOLDER_SYMBOL, DDL, DEFAULT_LOCAL_WORKSPACE_NAME, DIVIDE, DOLLAR_SIGN, DOT, DOT_CHAR, DOT_DOT, DOT_KOMODO, DOUBLE_BACK_SLASH, DRIVE_SEPARATOR, EMPTY_ARRAY, EMPTY_STRING, ENUM, EQUALS, FILE_EXTENSION_SEPARATOR, FILE_NAME_WILDCARD, FINAL, FORWARD_SLASH, HASH, HYPHEN, INTERFACE, JAR, JAVA, JAVA_IO_TMPDIR, JBOSS_SERVER_TMP_DIR, KOMODO, LINE_SEPARATOR, LINE_SEPARATOR_PROPERTY_NAME, LOG, MINUS, MULTIPLY, NBSP, NEW_LINE, OPEN_ANGLE_BRACKET, OPEN_BRACE, OPEN_BRACKET, OPEN_PRE_CMT, OPEN_PRE_TAG, OPEN_SQUARE_BRACKET, PARENT_FOLDER_SYMBOL, PERCENT, PIPE, PLUS, PREFIX_PATTERN, PRIVATE, PUBLIC, QUESTION_MARK, QUOTE_MARK, SEMI_COLON, SERVICE_VDB_SUFFIX, SERVICE_VDB_VIEW_MODEL, SERVICE_VDB_VIEW_SUFFIX, SOURCES, SPACE, SPEECH_MARK, SRC, STAR, STATIC, TAB, TARGET, UNDERSCORE, UNDERSCORE_CHAR, VDB_DEPLOYMENT_SUFFIX, VDB_PREFIX, XML, XML_SUFFIX, ZIP, ZIP_SUFFIX
Constructor and Description |
---|
PermissionImpl(Repository.UnitOfWork uow,
Repository repository,
String workspacePath) |
getDescriptor, getDescriptors, getFilters, getProperty, getPropertyDescriptor, getPropertyDescriptors, getPropertyNames, hasDescriptor, hasProperty, isChildRestricted, removeDescriptor, resolveType, setFilters, setPrimaryType, toString, validateInitialState
accept, addChild, addDescriptor, equals, getAbsolutePath, getAllDescriptors, getIndex, getName, getObjectFactory, getObjectProperty, getPrimaryType, getPropertyFactory, getRawChildren, getRawDescriptors, getRawParent, getRawProperty, getRawPropertyDescriptors, getRawPropertyNames, getRepository, handleError, hashCode, hasProperties, hasRawChild, hasRawChild, hasRawChildren, hasRawProperty, print, provision, remove, removeChild, rename, setObjectProperty, setProperty, validatePropertyValue, validateType
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getFilters, setFilters
accept, addChild, addDescriptor, getDescriptor, getDescriptors, getIndex, getObjectFactory, getPrimaryType, getProperty, getPropertyDescriptor, getPropertyDescriptors, getPropertyFactory, getPropertyNames, getRawChildren, getRawDescriptors, getRawParent, getRawProperty, getRawPropertyDescriptors, getRawPropertyNames, hasDescriptor, hasProperties, hasProperty, hasRawChild, hasRawChild, hasRawChildren, hasRawProperty, isChildRestricted, print, remove, removeChild, removeDescriptor, rename, setPrimaryType, setProperty
getAbsolutePath, getName, getRepository
public PermissionImpl(Repository.UnitOfWork uow, Repository repository, String workspacePath) throws KException
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the relational object exists (cannot be null
)workspacePath
- the workspace path (cannot be empty)KException
- if an error occurspublic KomodoType getTypeIdentifier(Repository.UnitOfWork uow)
getTypeIdentifier
in interface KomodoObject
getTypeIdentifier
in class ObjectImpl
public Condition addCondition(Repository.UnitOfWork transaction, String conditionName) throws KException
addCondition
in interface Permission
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)conditionName
- the name of the condition being added (cannot be empty)null
)KException
- if an error occursPermission.addCondition(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public Mask addMask(Repository.UnitOfWork transaction, String maskName) throws KException
addMask
in interface Permission
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)maskName
- the name of the mask being added (cannot be empty)null
)KException
- if an error occursPermission.addMask(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public KomodoObject getChild(Repository.UnitOfWork transaction, String name) throws KException
getChild
in interface KomodoObject
getChild
in class RelationalObjectImpl
KException
RelationalObjectImpl.getChild(org.komodo.spi.repository.Repository.UnitOfWork,
java.lang.String)
public KomodoObject getChild(Repository.UnitOfWork transaction, String name, String typeName) throws KException
getChild
in interface KomodoObject
getChild
in class RelationalObjectImpl
KException
RelationalObjectImpl.getChild(org.komodo.spi.repository.Repository.UnitOfWork,
java.lang.String, java.lang.String)
public KomodoType[] getChildTypes()
getChildTypes
in interface KomodoObject
getChildTypes
in class ObjectImpl
ObjectImpl.getChildTypes()
public KomodoObject[] getChildren(Repository.UnitOfWork transaction, String... namePatterns) throws KException
getChildren
in interface KomodoObject
getChildren
in class RelationalObjectImpl
KException
RelationalObjectImpl.getChildren(org.komodo.spi.repository.Repository.UnitOfWork,
java.lang.String[])
public KomodoObject[] getChildrenOfType(Repository.UnitOfWork transaction, String type, String... namePatterns) throws KException
getChildrenOfType
in interface KomodoObject
getChildrenOfType
in class RelationalObjectImpl
KException
RelationalObjectImpl.getChildrenOfType(org.komodo.spi.repository.Repository.UnitOfWork,
java.lang.String, java.lang.String[])
public Condition[] getConditions(Repository.UnitOfWork transaction, String... namePatterns) throws KException
getConditions
in interface Permission
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)namePatterns
- optional name patterns (can be null
or empty but cannot have null
or empty elements)null
but can be empty)KException
- if an error occursPermission.getConditions(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String[])
public Mask[] getMasks(Repository.UnitOfWork transaction, String... namePatterns) throws KException
getMasks
in interface Permission
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)namePatterns
- optional name patterns (can be null
or empty but cannot have null
or empty elements)null
but can be empty)KException
- if an error occursPermission.getMasks(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String[])
public DataRole getParent(Repository.UnitOfWork transaction) throws KException
getParent
in interface Permission
getParent
in interface KNode
getParent
in class RelationalObjectImpl
KException
RelationalObjectImpl.getParent(org.komodo.spi.repository.Repository.UnitOfWork)
public String getResourceName(Repository.UnitOfWork transaction) throws KException
getResourceName
in interface Permission
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)KException
- if an error occursPermission.getResourceName(org.komodo.spi.repository.Repository.UnitOfWork)
public int getTypeId()
getTypeId
in interface KomodoObject
getTypeId
in class ObjectImpl
KomodoObject.getTypeId()
public boolean hasChild(Repository.UnitOfWork transaction, String name) throws KException
hasChild
in interface KomodoObject
hasChild
in class RelationalObjectImpl
KException
RelationalObjectImpl.hasChild(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public boolean hasChild(Repository.UnitOfWork transaction, String name, String typeName) throws KException
hasChild
in interface KomodoObject
hasChild
in class RelationalObjectImpl
KException
RelationalObjectImpl.hasChild(org.komodo.spi.repository.Repository.UnitOfWork,
java.lang.String, java.lang.String)
public boolean hasChildren(Repository.UnitOfWork transaction) throws KException
hasChildren
in interface KomodoObject
hasChildren
in class RelationalObjectImpl
KException
RelationalObjectImpl.hasChildren(org.komodo.spi.repository.Repository.UnitOfWork)
public boolean isAllowAlter(Repository.UnitOfWork uow) throws KException
isAllowAlter
in interface Permission
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)true
if this permission allows alterKException
- if an error occursPermission.isAllowAlter(org.komodo.spi.repository.Repository.UnitOfWork)
public boolean isAllowCreate(Repository.UnitOfWork uow) throws KException
isAllowCreate
in interface Permission
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)true
if this permission allows createKException
- if an error occursPermission.isAllowCreate(org.komodo.spi.repository.Repository.UnitOfWork)
public boolean isAllowDelete(Repository.UnitOfWork uow) throws KException
isAllowDelete
in interface Permission
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)true
if this permission allows deleteKException
- if an error occursPermission.isAllowDelete(org.komodo.spi.repository.Repository.UnitOfWork)
public boolean isAllowExecute(Repository.UnitOfWork uow) throws KException
isAllowExecute
in interface Permission
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)true
if this permission allows executeKException
- if an error occursPermission.isAllowExecute(org.komodo.spi.repository.Repository.UnitOfWork)
public boolean isAllowLanguage(Repository.UnitOfWork uow) throws KException
isAllowLanguage
in interface Permission
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)true
if this permission allows languageKException
- if an error occursPermission.isAllowLanguage(org.komodo.spi.repository.Repository.UnitOfWork)
public boolean isAllowRead(Repository.UnitOfWork uow) throws KException
isAllowRead
in interface Permission
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)true
if this permission allows readKException
- if an error occursPermission.isAllowRead(org.komodo.spi.repository.Repository.UnitOfWork)
public boolean isAllowUpdate(Repository.UnitOfWork uow) throws KException
isAllowUpdate
in interface Permission
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)true
if this permission allows updateKException
- if an error occursPermission.isAllowUpdate(org.komodo.spi.repository.Repository.UnitOfWork)
public void removeCondition(Repository.UnitOfWork transaction, String conditionToRemove) throws KException
removeCondition
in interface Permission
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)conditionToRemove
- the name of the condition being removed (cannot be empty)KException
- if an error occursPermission.removeCondition(org.komodo.spi.repository.Repository.UnitOfWork,
java.lang.String)
public void removeMask(Repository.UnitOfWork transaction, String maskToRemove) throws KException
removeMask
in interface Permission
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)maskToRemove
- the name of the mask being removed (cannot be empty)KException
- if an error occursPermission.removeMask(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public void setAllowAlter(Repository.UnitOfWork uow, boolean newAllowAlter) throws KException
setAllowAlter
in interface Permission
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)newAllowAlter
- the new value for the allow alter
propertyKException
- if an error occursPermission.setAllowAlter(org.komodo.spi.repository.Repository.UnitOfWork, boolean)
public void setAllowCreate(Repository.UnitOfWork uow, boolean newAllowCreate) throws KException
setAllowCreate
in interface Permission
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)newAllowCreate
- the new value for the allow create
propertyKException
- if an error occursPermission.setAllowCreate(org.komodo.spi.repository.Repository.UnitOfWork, boolean)
public void setAllowDelete(Repository.UnitOfWork uow, boolean newAllowDelete) throws KException
setAllowDelete
in interface Permission
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)newAllowDelete
- the new value for the allow delete
propertyKException
- if an error occursPermission.setAllowDelete(org.komodo.spi.repository.Repository.UnitOfWork, boolean)
public void setAllowExecute(Repository.UnitOfWork uow, boolean newAllowExecute) throws KException
setAllowExecute
in interface Permission
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)newAllowExecute
- the new value for the allow execute
propertyKException
- if an error occursPermission.setAllowExecute(org.komodo.spi.repository.Repository.UnitOfWork, boolean)
public void setAllowLanguage(Repository.UnitOfWork uow, boolean newAllowLanguage) throws KException
setAllowLanguage
in interface Permission
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)newAllowLanguage
- the new value for the allow language
propertyKException
- if an error occursPermission.setAllowLanguage(org.komodo.spi.repository.Repository.UnitOfWork, boolean)
public void setAllowRead(Repository.UnitOfWork uow, boolean newAllowRead) throws KException
setAllowRead
in interface Permission
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)newAllowRead
- the new value for the allow read
propertyKException
- if an error occursPermission.setAllowRead(org.komodo.spi.repository.Repository.UnitOfWork, boolean)
public void setAllowUpdate(Repository.UnitOfWork uow, boolean newAllowUpdate) throws KException
setAllowUpdate
in interface Permission
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)newAllowUpdate
- the new value for the allow update
propertyKException
- if an error occursPermission.setAllowUpdate(org.komodo.spi.repository.Repository.UnitOfWork, boolean)
Copyright © 2013–2019. All rights reserved.