Interface KewTypeRepositoryService
public interface KewTypeRepositoryService
-
Method Summary
Modifier and TypeMethodDescriptioncreateKewType(KewTypeDefinition kewType) This will create aKewTypeDefinitionexactly like the parameter passed in.voidcreateKewTypeAttribute(KewTypeAttribute kewTypeAttribute) This will create aKewTypeAttributeexactly like the parameter passed in.Returns all KEW typesfindAllTypesByNamespace(String namespace) Returns all KEW types that for a given namespace.getTypeById(String id) Lookup a kew type based on the given id.getTypeByNameAndNamespace(String name, String namespace) Get a kew type object based on name and namespacevoidupdateKewType(KewTypeDefinition kewType) This will update an existingKewTypeDefinitionvoidupdateKewTypeAttribute(KewTypeAttribute kewTypeAttribute) This will update an existingKewTypeAttribute
-
Method Details
-
createKewType
KewTypeDefinition createKewType(KewTypeDefinition kewType) throws RiceIllegalArgumentException, RiceIllegalStateException This will create aKewTypeDefinitionexactly like the parameter passed in.- Parameters:
kewType- - KewType- Throws:
IllegalArgumentException- if the kewType is nullIllegalStateException- if the kewType already exists in the systemRiceIllegalArgumentExceptionRiceIllegalStateException
-
updateKewType
void updateKewType(KewTypeDefinition kewType) throws RiceIllegalArgumentException, RiceIllegalStateException This will update an existingKewTypeDefinition- Parameters:
kewType- - KewType- Throws:
IllegalArgumentException- if the kewType is nullIllegalStateException- if the KewType does not exist in the systemRiceIllegalArgumentExceptionRiceIllegalStateException
-
getTypeById
Lookup a kew type based on the given id.- Parameters:
id- the given kew type id- Returns:
- a KewType object with the given id. A null reference is returned if an invalid or non-existant id is supplied.
- Throws:
RiceIllegalArgumentException
-
getTypeByNameAndNamespace
KewTypeDefinition getTypeByNameAndNamespace(String name, String namespace) throws RiceIllegalArgumentException, RiceIllegalStateException Get a kew type object based on name and namespace- Parameters:
name- the given type namenamespace- the given type namespace- Returns:
- A kew type object with the given namespace and name if one with that name and namespace exists. Otherwise, null is returned.
- Throws:
IllegalStateException- if multiple kew types exist with the same name and namespaceRiceIllegalArgumentExceptionRiceIllegalStateException
-
findAllTypesByNamespace
List<KewTypeDefinition> findAllTypesByNamespace(String namespace) throws RiceIllegalArgumentException Returns all KEW types that for a given namespace.- Returns:
- all KEW types for a namespace
- Throws:
RiceIllegalArgumentException
-
findAllTypes
List<KewTypeDefinition> findAllTypes()Returns all KEW types- Returns:
- all KEW types
-
createKewTypeAttribute
void createKewTypeAttribute(KewTypeAttribute kewTypeAttribute) throws RiceIllegalArgumentException, RiceIllegalStateException This will create aKewTypeAttributeexactly like the parameter passed in.- Parameters:
kewTypeAttribute- - KewTypeAttribute- Throws:
IllegalArgumentException- if the kewTypeAttribute is nullIllegalStateException- if the KewTypeAttribute already exists in the systemRiceIllegalArgumentExceptionRiceIllegalStateException
-
updateKewTypeAttribute
void updateKewTypeAttribute(KewTypeAttribute kewTypeAttribute) throws RiceIllegalArgumentException, RiceIllegalStateException This will update an existingKewTypeAttribute- Parameters:
kewTypeAttribute- - KewTypeAttribute- Throws:
IllegalArgumentException- if the kewTypeAttribute is nullIllegalStateException- if the KewTypeAttribute does not exist in the systemRiceIllegalArgumentExceptionRiceIllegalStateException
-