org.kuali.rice.krms.impl.repository
Class KrmsTypeBoServiceImpl

java.lang.Object
  extended by org.kuali.rice.krms.impl.repository.KrmsTypeBoServiceImpl
All Implemented Interfaces:
KrmsTypeRepositoryService

public final class KrmsTypeBoServiceImpl
extends Object
implements KrmsTypeRepositoryService


Constructor Summary
KrmsTypeBoServiceImpl()
           
 
Method Summary
protected  List<KrmsTypeDefinition> convertListOfBosToImmutables(Collection<org.kuali.rice.krms.impl.repository.KrmsTypeBo> krmsTypeBos)
          Converts a List to an Unmodifiable List
 KrmsTypeDefinition createKrmsType(KrmsTypeDefinition krmsType)
          This overridden method creates a KrmsType if it does not already exist in the repository.
 List<KrmsTypeDefinition> findAllActionTypesByContextId(String contextId)
          Returns all action types for the given contextId.
 List<KrmsTypeDefinition> findAllAgendaTypesByContextId(String contextId)
          Returns all agenda types for the given contextId.
 List<KrmsTypeDefinition> findAllRuleTypesByContextId(String contextId)
          Returns all rule types for the given contextId.
 List<KrmsTypeDefinition> findAllTypes()
          Returns all KRMS types
 List<KrmsTypeDefinition> findAllTypesByNamespace(String namespaceCode)
          Returns all KRMS types that for a given namespace.
 org.kuali.rice.krms.impl.repository.KrmsTypeBo from(KrmsTypeDefinition krmsType)
          Converts a immutable KrmsTypeDefinition to its mutable KrmsTypeBo counterpart.
 KrmsTypeDefinition getActionTypeByActionTypeIdAndContextId(String actionTypeId, String contextId)
          Return the action type by actionItemId for the given contextId.
 KrmsTypeDefinition getAgendaTypeByAgendaTypeIdAndContextId(String agendaTypeId, String contextId)
          Return the agenda type by agendaItemId for the given contextId.
 KrmsAttributeDefinition getAttributeDefinitionById(String attributeDefinitionId)
          Retrieves an attribute definition for the given id.
 KrmsAttributeDefinition getAttributeDefinitionByName(String namespaceCode, String name)
          Retrieves an attribute definition for the given namespace code and name.
 KrmsTypeDefinition getRuleTypeByRuleTypeIdAndContextId(String ruleTypeId, String contextId)
          Return the rule type by ruleItemId for the given contextId.
 KrmsTypeDefinition getTypeById(String id)
          Lookup a krms type based on the given id.
 KrmsTypeDefinition getTypeByName(String namespaceCode, String name)
          Get a krms type object based on name and namespace
 void setBusinessObjectService(BusinessObjectService businessObjectService)
          Sets the businessObjectService attribute value.
 KrmsTypeDefinition updateKrmsType(KrmsTypeDefinition krmsType)
          This overridden method updates an existing KrmsType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KrmsTypeBoServiceImpl

public KrmsTypeBoServiceImpl()
Method Detail

createKrmsType

public KrmsTypeDefinition createKrmsType(KrmsTypeDefinition krmsType)
This overridden method creates a KrmsType if it does not already exist in the repository.

Specified by:
createKrmsType in interface KrmsTypeRepositoryService
Parameters:
krmsType - - KrmsType
See Also:
KrmsTypeRepositoryService.createKrmsType(org.kuali.rice.krms.api.repository.type.KrmsTypeDefinition)

updateKrmsType

public KrmsTypeDefinition updateKrmsType(KrmsTypeDefinition krmsType)
This overridden method updates an existing KrmsType

Specified by:
updateKrmsType in interface KrmsTypeRepositoryService
Parameters:
krmsType - - KrmsType
See Also:
KrmsTypeRepositoryService.updateKrmsType(org.kuali.rice.krms.api.repository.type.KrmsTypeDefinition)

getTypeById

public KrmsTypeDefinition getTypeById(String id)
Description copied from interface: KrmsTypeRepositoryService
Lookup a krms type based on the given id.

Specified by:
getTypeById in interface KrmsTypeRepositoryService
Parameters:
id - the given KRMS type id
Returns:
a KRMS KrmsType object with the given id. A null reference is returned if an invalid or non-existant id is supplied.

getTypeByName

public KrmsTypeDefinition getTypeByName(String namespaceCode,
                                        String name)
Description copied from interface: KrmsTypeRepositoryService
Get a krms type object based on name and namespace

Specified by:
getTypeByName in interface KrmsTypeRepositoryService
Parameters:
namespaceCode - the given type namespace
name - the given type name
Returns:
A krms type object with the given namespace and name if one with that name and namespace exists. Otherwise, null is returned.

findAllTypesByNamespace

public List<KrmsTypeDefinition> findAllTypesByNamespace(String namespaceCode)
Description copied from interface: KrmsTypeRepositoryService
Returns all KRMS types that for a given namespace.

Specified by:
findAllTypesByNamespace in interface KrmsTypeRepositoryService
Returns:
all KRMS types for a namespace

findAllTypes

public List<KrmsTypeDefinition> findAllTypes()
Description copied from interface: KrmsTypeRepositoryService
Returns all KRMS types

Specified by:
findAllTypes in interface KrmsTypeRepositoryService
Returns:
all KRMS types

findAllAgendaTypesByContextId

public List<KrmsTypeDefinition> findAllAgendaTypesByContextId(String contextId)
Description copied from interface: KrmsTypeRepositoryService
Returns all agenda types for the given contextId.

Specified by:
findAllAgendaTypesByContextId in interface KrmsTypeRepositoryService
Parameters:
contextId - the id of the context
Returns:
all agenda types for the given contextId

getAgendaTypeByAgendaTypeIdAndContextId

public KrmsTypeDefinition getAgendaTypeByAgendaTypeIdAndContextId(String agendaTypeId,
                                                                  String contextId)
Description copied from interface: KrmsTypeRepositoryService
Return the agenda type by agendaItemId for the given contextId.

Specified by:
getAgendaTypeByAgendaTypeIdAndContextId in interface KrmsTypeRepositoryService
Parameters:
agendaTypeId - the id of the agendaType
contextId - the id of the context
Returns:
agendaType or null if none is found

findAllRuleTypesByContextId

public List<KrmsTypeDefinition> findAllRuleTypesByContextId(String contextId)
Description copied from interface: KrmsTypeRepositoryService
Returns all rule types for the given contextId.

Specified by:
findAllRuleTypesByContextId in interface KrmsTypeRepositoryService
Parameters:
contextId - the id of the context
Returns:
all rule types for the given contextId

getRuleTypeByRuleTypeIdAndContextId

public KrmsTypeDefinition getRuleTypeByRuleTypeIdAndContextId(String ruleTypeId,
                                                              String contextId)
Description copied from interface: KrmsTypeRepositoryService
Return the rule type by ruleItemId for the given contextId.

Specified by:
getRuleTypeByRuleTypeIdAndContextId in interface KrmsTypeRepositoryService
Parameters:
ruleTypeId - the id of the ruleType
contextId - the id of the context
Returns:
ruleType or null if none is found

findAllActionTypesByContextId

public List<KrmsTypeDefinition> findAllActionTypesByContextId(String contextId)
Description copied from interface: KrmsTypeRepositoryService
Returns all action types for the given contextId.

Specified by:
findAllActionTypesByContextId in interface KrmsTypeRepositoryService
Parameters:
contextId - the id of the context
Returns:
all action types for the given contextId

getActionTypeByActionTypeIdAndContextId

public KrmsTypeDefinition getActionTypeByActionTypeIdAndContextId(String actionTypeId,
                                                                  String contextId)
Description copied from interface: KrmsTypeRepositoryService
Return the action type by actionItemId for the given contextId.

Specified by:
getActionTypeByActionTypeIdAndContextId in interface KrmsTypeRepositoryService
Parameters:
actionTypeId - the id of the actionType
contextId - the id of the context
Returns:
actionType or null if none is found

getAttributeDefinitionById

public KrmsAttributeDefinition getAttributeDefinitionById(String attributeDefinitionId)
Description copied from interface: KrmsTypeRepositoryService
Retrieves an attribute definition for the given id.

Specified by:
getAttributeDefinitionById in interface KrmsTypeRepositoryService
Parameters:
attributeDefinitionId - the id of the attribute definition to retrieve
Returns:
the attribute definition matching the given id, or null if no corresponding attribute definition could be found with the given id value

getAttributeDefinitionByName

public KrmsAttributeDefinition getAttributeDefinitionByName(String namespaceCode,
                                                            String name)
Description copied from interface: KrmsTypeRepositoryService
Retrieves an attribute definition for the given namespace code and name.

Specified by:
getAttributeDefinitionByName in interface KrmsTypeRepositoryService
Parameters:
namespaceCode - the namespace under which to locate the attribute definition
name - the name of the attribute definition to retrieve
Returns:
the attribute definition matching the give namespace code and name, or null if no corresponding attribute definition could be located

from

public org.kuali.rice.krms.impl.repository.KrmsTypeBo from(KrmsTypeDefinition krmsType)
Converts a immutable KrmsTypeDefinition to its mutable KrmsTypeBo counterpart.

Parameters:
krmsType - the immutable object.
Returns:
a KrmsTypeBo the mutable KrmsTypeBo.

setBusinessObjectService

public void setBusinessObjectService(BusinessObjectService businessObjectService)
Sets the businessObjectService attribute value.

Parameters:
businessObjectService - The businessObjectService to set.

convertListOfBosToImmutables

protected List<KrmsTypeDefinition> convertListOfBosToImmutables(Collection<org.kuali.rice.krms.impl.repository.KrmsTypeBo> krmsTypeBos)
Converts a List to an Unmodifiable List

Parameters:
krmsTypeBos - a mutable List to made completely immutable.
Returns:
An unmodifiable List


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.