org.kuali.ole.ingest
Class KrmsBuilder

java.lang.Object
  extended by org.kuali.ole.ingest.KrmsBuilder

public class KrmsBuilder
extends Object

KrmsBuilder will create context,category and rules for creating agenda and finally persists into database.


Constructor Summary
KrmsBuilder()
           
 
Method Summary
 org.kuali.rice.krms.impl.repository.ActionBo addActionToRule(String namespace, String actionName, String description, String actionTypeId, org.kuali.rice.krms.impl.repository.RuleBo ruleBo, Integer sequenceNumber)
          This method adds the action into rule to create the agenda.
 org.kuali.rice.krms.impl.repository.PropositionBo addConstantToPropositionParameter(String constant, org.kuali.rice.krms.impl.repository.PropositionBo proposition)
          This method returns the PropositionBo object based on the constant and proposition parameters Creates a new object, stores it in database and returns the object.
 org.kuali.rice.krms.impl.repository.PropositionBo addCustomFunctionToPropositionParameter(String functionId, org.kuali.rice.krms.impl.repository.PropositionBo proposition)
          This method returns the PropositionBo object based on the functionId and proposition parameters Creates a new object, stores it in database and returns the object.
 org.kuali.rice.krms.impl.repository.AgendaItemBo addDummyRuleForFalseAction(org.kuali.rice.krms.impl.repository.RuleBo ruleBo, org.kuali.rice.krms.impl.repository.RuleBo falseActionRuleBo)
          This method adds the dummy rule into database for falseAction.
 org.kuali.rice.krms.impl.repository.PropositionBo addOperatorToPropositionParameter(String operator, org.kuali.rice.krms.impl.repository.PropositionBo proposition)
          This method returns the PropositionBo object based on the operator and proposition parameters Creates a new object, stores it in database and returns the object.
 org.kuali.rice.krms.impl.repository.AgendaBo addRuleToAgenda(org.kuali.rice.krms.impl.repository.AgendaBo agendaBo, org.kuali.rice.krms.impl.repository.RuleBo ruleBo, int count)
          This method returns the agendaBo object based on the agendaBo, ruleBo and count parameters Creates a new object, stores it in database and returns if none exists, otherwise returns the existing object.
 org.kuali.rice.krms.impl.repository.PropositionBo addTermToPropositionParameter(String termId, org.kuali.rice.krms.impl.repository.PropositionBo proposition)
          This method returns the PropositionBo object based on the termId and proposition parameters Creates a new object, stores it in database and returns the object.
 org.kuali.rice.krms.impl.repository.AgendaBo createAgenda(String agendaName, org.kuali.rice.krms.impl.repository.ContextBo contextBo)
          This method returns the agendaBo object based on the agendaName and contextBo parameters.
 org.kuali.rice.krms.impl.repository.CategoryBo createCategory(String namespace, String categoryName)
          This method returns the categoryBo object based on the namespace and the categoryName parameters.
 org.kuali.rice.krms.impl.repository.PropositionBo createCompoundProposition(String categoryId, String propositionDescription, String propositionType, org.kuali.rice.krms.impl.repository.RuleBo rule, String operatorCode)
          This method returns the propositionBo object based on the categoryId, propositionDescription, propositionType, rule and operatorCode parameters Creates a new object, stores it in database and returns the object.
 org.kuali.rice.krms.impl.repository.ContextBo createContext(String namespace, String contextName)
          This method returns the contextBo object based on the namespace and contextName parameters.
 org.kuali.rice.krms.impl.repository.FunctionBo createFunction(String namespace, String termName, String returnType, List categories, String parameterType)
          This method returns the functionBo object based on the namespace, termName, returnType, categories and parameterType parameters Creates a new object, stores it in database and returns if none exists, otherwise returns the existing object.
 org.kuali.rice.krms.impl.repository.PropositionBo createProposition(String categoryId, String propositionDescription, String propositionType, org.kuali.rice.krms.impl.repository.RuleBo rule, Integer seqNum)
          This method returns the propositionBo object based on the categoryId, propositionDescription, propositionType, rule and seqNum parameters Creates a new object, stores it in database and returns the object.
 org.kuali.rice.krms.impl.repository.RuleBo createRule(String namespace, String ruleName)
          This method returns the ruleBo object based on the name and termSpecificationBo parameters Creates a new object, stores it in database and returns if none exists, otherwise returns the existing object.
 org.kuali.rice.krms.impl.repository.TermBo createTerm(String name, org.kuali.rice.krms.impl.repository.TermSpecificationBo termSpecificationBo)
          This method returns the termBo object based on the name and termSpecificationBo parameters Creates a new object, stores it in database and returns if none exists, otherwise returns the existing object.
 org.kuali.rice.krms.impl.repository.TermSpecificationBo createTermSpecification(String namespace, String termSpecificationName, String type, List<org.kuali.rice.krms.impl.repository.CategoryBo> categoryBoList, List<org.kuali.rice.krms.impl.repository.ContextBo> contextBoList)
          This method returns the termSpecificationBo object based on the namespace, termSpecificationName, type, categoryBoList and contextBoList parameters.
 void deleteAgenda(OleAgenda oleAgenda)
          This method deletes the term record from database.
 Boolean doesKrmsExist(String agendaName)
          Lookups the database based on the agendaName and returns a boolean value.
 org.kuali.rice.krms.impl.repository.AgendaBo getAgendaBo()
          Gets the agendaBo attribute.
 org.kuali.rice.krms.impl.repository.CategoryBo getCategory()
          Gets the category attribute.
 org.kuali.rice.krms.impl.repository.ContextBo getContext()
          Gets the context attribute.
 KrmsObjectGeneratorFromXML getKrmsObjectGeneratorFromXML()
          Gets the krmsObjectGeneratorFromXML object if exists, otherwise it creates a new object.
 org.kuali.rice.krms.impl.repository.RuleBo getRuleBo()
          Gets the ruleBo attribute.
 Object objectExists(Class objectClass, String key, String value)
          This method returns the Object value if it exists or else null value based on objectClass, key and value parameters.
 String persist(OleAgenda oleAgenda)
          This method will create context,category and rules for creating agenda and finally persists into database.
 List<String> persistKrmsFromFileContent(String fileContent)
          This method builds the Krms object from the fileContent parameter and the returns the list of agendaNames from the Krms object.
 void registerDefaultFunctionLoader()
          This method save the DefaultFunctionLoader into the database.
 org.kuali.rice.krms.impl.repository.ContextValidActionBo registerDefaultServiceTypes(org.kuali.rice.krms.impl.repository.ContextBo contextBo)
          This method registers the default service types in the database for the context.
 void setAgendaBo(org.kuali.rice.krms.impl.repository.AgendaBo agendaBo)
          Sets the agendaBo attribute value.
 void setCategory(org.kuali.rice.krms.impl.repository.CategoryBo category)
          Sets the category attribute value.
 void setContext(org.kuali.rice.krms.impl.repository.ContextBo context)
          Sets the Context attribute value.
 void setKrmsObjectGeneratorFromXML(KrmsObjectGeneratorFromXML krmsObjectGeneratorFromXML)
          Sets the krmsObjectGeneratorFromXML value.
 void setRuleBo(org.kuali.rice.krms.impl.repository.RuleBo ruleBo)
          Sets the ruleBo attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KrmsBuilder

public KrmsBuilder()
Method Detail

createContext

public org.kuali.rice.krms.impl.repository.ContextBo createContext(String namespace,
                                                                   String contextName)
This method returns the contextBo object based on the namespace and contextName parameters. Creates a new object, stores it in database and returns if none exists, otherwise returns the existing object.

Parameters:
namespace -
contextName -
Returns:
contextBo

objectExists

public Object objectExists(Class objectClass,
                           String key,
                           String value)
This method returns the Object value if it exists or else null value based on objectClass, key and value parameters.

Parameters:
objectClass -
key -
value -
Returns:
object

createCategory

public org.kuali.rice.krms.impl.repository.CategoryBo createCategory(String namespace,
                                                                     String categoryName)
This method returns the categoryBo object based on the namespace and the categoryName parameters. Creates a new object, stores it in database and returns if none exists, otherwise returns the existing object.

Parameters:
namespace -
categoryName -
Returns:
categoryBo

registerDefaultFunctionLoader

public void registerDefaultFunctionLoader()
This method save the DefaultFunctionLoader into the database.


createAgenda

public org.kuali.rice.krms.impl.repository.AgendaBo createAgenda(String agendaName,
                                                                 org.kuali.rice.krms.impl.repository.ContextBo contextBo)
This method returns the agendaBo object based on the agendaName and contextBo parameters. Creates a new object, stores it in database and returns if none exists, otherwise returns the existing object.

Parameters:
agendaName -
contextBo -
Returns:
agendaBo

createTermSpecification

public org.kuali.rice.krms.impl.repository.TermSpecificationBo createTermSpecification(String namespace,
                                                                                       String termSpecificationName,
                                                                                       String type,
                                                                                       List<org.kuali.rice.krms.impl.repository.CategoryBo> categoryBoList,
                                                                                       List<org.kuali.rice.krms.impl.repository.ContextBo> contextBoList)
This method returns the termSpecificationBo object based on the namespace, termSpecificationName, type, categoryBoList and contextBoList parameters. Creates a new object, stores it in database and returns if none exists, otherwise returns the existing object.

Parameters:
namespace -
termSpecificationName -
type -
categoryBoList -
contextBoList -
Returns:
termSpecificationBo

createTerm

public org.kuali.rice.krms.impl.repository.TermBo createTerm(String name,
                                                             org.kuali.rice.krms.impl.repository.TermSpecificationBo termSpecificationBo)
This method returns the termBo object based on the name and termSpecificationBo parameters Creates a new object, stores it in database and returns if none exists, otherwise returns the existing object.

Parameters:
name -
termSpecificationBo -
Returns:
termBo

createRule

public org.kuali.rice.krms.impl.repository.RuleBo createRule(String namespace,
                                                             String ruleName)
This method returns the ruleBo object based on the name and termSpecificationBo parameters Creates a new object, stores it in database and returns if none exists, otherwise returns the existing object.

Parameters:
namespace -
ruleName -
Returns:
ruleBo

addRuleToAgenda

public org.kuali.rice.krms.impl.repository.AgendaBo addRuleToAgenda(org.kuali.rice.krms.impl.repository.AgendaBo agendaBo,
                                                                    org.kuali.rice.krms.impl.repository.RuleBo ruleBo,
                                                                    int count)
This method returns the agendaBo object based on the agendaBo, ruleBo and count parameters Creates a new object, stores it in database and returns if none exists, otherwise returns the existing object.

Parameters:
agendaBo -
ruleBo -
count -
Returns:
agendaBo

createProposition

public org.kuali.rice.krms.impl.repository.PropositionBo createProposition(String categoryId,
                                                                           String propositionDescription,
                                                                           String propositionType,
                                                                           org.kuali.rice.krms.impl.repository.RuleBo rule,
                                                                           Integer seqNum)
This method returns the propositionBo object based on the categoryId, propositionDescription, propositionType, rule and seqNum parameters Creates a new object, stores it in database and returns the object.

Parameters:
categoryId -
propositionDescription -
propositionType -
rule -
seqNum -
Returns:
propositionBo

createCompoundProposition

public org.kuali.rice.krms.impl.repository.PropositionBo createCompoundProposition(String categoryId,
                                                                                   String propositionDescription,
                                                                                   String propositionType,
                                                                                   org.kuali.rice.krms.impl.repository.RuleBo rule,
                                                                                   String operatorCode)
This method returns the propositionBo object based on the categoryId, propositionDescription, propositionType, rule and operatorCode parameters Creates a new object, stores it in database and returns the object.

Parameters:
categoryId -
propositionDescription -
propositionType -
rule -
operatorCode -
Returns:
propositionBo

createFunction

public org.kuali.rice.krms.impl.repository.FunctionBo createFunction(String namespace,
                                                                     String termName,
                                                                     String returnType,
                                                                     List categories,
                                                                     String parameterType)
This method returns the functionBo object based on the namespace, termName, returnType, categories and parameterType parameters Creates a new object, stores it in database and returns if none exists, otherwise returns the existing object.

Parameters:
namespace -
termName -
returnType -
categories -
parameterType -
Returns:
functionBo

addTermToPropositionParameter

public org.kuali.rice.krms.impl.repository.PropositionBo addTermToPropositionParameter(String termId,
                                                                                       org.kuali.rice.krms.impl.repository.PropositionBo proposition)
This method returns the PropositionBo object based on the termId and proposition parameters Creates a new object, stores it in database and returns the object.

Parameters:
termId -
proposition -
Returns:
PropositionBo

addOperatorToPropositionParameter

public org.kuali.rice.krms.impl.repository.PropositionBo addOperatorToPropositionParameter(String operator,
                                                                                           org.kuali.rice.krms.impl.repository.PropositionBo proposition)
This method returns the PropositionBo object based on the operator and proposition parameters Creates a new object, stores it in database and returns the object.

Parameters:
operator -
proposition -
Returns:
proposition

addConstantToPropositionParameter

public org.kuali.rice.krms.impl.repository.PropositionBo addConstantToPropositionParameter(String constant,
                                                                                           org.kuali.rice.krms.impl.repository.PropositionBo proposition)
This method returns the PropositionBo object based on the constant and proposition parameters Creates a new object, stores it in database and returns the object.

Parameters:
constant -
proposition -
Returns:
proposition

addCustomFunctionToPropositionParameter

public org.kuali.rice.krms.impl.repository.PropositionBo addCustomFunctionToPropositionParameter(String functionId,
                                                                                                 org.kuali.rice.krms.impl.repository.PropositionBo proposition)
This method returns the PropositionBo object based on the functionId and proposition parameters Creates a new object, stores it in database and returns the object.

Parameters:
functionId -
proposition -
Returns:
PropositionBo

persist

public String persist(OleAgenda oleAgenda)
This method will create context,category and rules for creating agenda and finally persists into database.

Parameters:
oleAgenda -
Returns:
agendaName

persistKrmsFromFileContent

public List<String> persistKrmsFromFileContent(String fileContent)
                                        throws IOException,
                                               URISyntaxException
This method builds the Krms object from the fileContent parameter and the returns the list of agendaNames from the Krms object.

Parameters:
fileContent -
Returns:
agendaNames
Throws:
IOException
URISyntaxException

getKrmsObjectGeneratorFromXML

public KrmsObjectGeneratorFromXML getKrmsObjectGeneratorFromXML()
Gets the krmsObjectGeneratorFromXML object if exists, otherwise it creates a new object.

Returns:
krmsObjectGeneratorFromXML

setKrmsObjectGeneratorFromXML

public void setKrmsObjectGeneratorFromXML(KrmsObjectGeneratorFromXML krmsObjectGeneratorFromXML)
Sets the krmsObjectGeneratorFromXML value.

Parameters:
krmsObjectGeneratorFromXML -

doesKrmsExist

public Boolean doesKrmsExist(String agendaName)
Lookups the database based on the agendaName and returns a boolean value.

Parameters:
agendaName -
Returns:
Boolean

deleteAgenda

public void deleteAgenda(OleAgenda oleAgenda)
This method deletes the term record from database.

Parameters:
oleAgenda -

registerDefaultServiceTypes

public org.kuali.rice.krms.impl.repository.ContextValidActionBo registerDefaultServiceTypes(org.kuali.rice.krms.impl.repository.ContextBo contextBo)
This method registers the default service types in the database for the context.

Parameters:
contextBo -
Returns:
ContextValidActionBo

addActionToRule

public org.kuali.rice.krms.impl.repository.ActionBo addActionToRule(String namespace,
                                                                    String actionName,
                                                                    String description,
                                                                    String actionTypeId,
                                                                    org.kuali.rice.krms.impl.repository.RuleBo ruleBo,
                                                                    Integer sequenceNumber)
This method adds the action into rule to create the agenda.

Parameters:
namespace -
actionName -
description -
actionTypeId -
ruleBo -
sequenceNumber -
Returns:
ActionBo

addDummyRuleForFalseAction

public org.kuali.rice.krms.impl.repository.AgendaItemBo addDummyRuleForFalseAction(org.kuali.rice.krms.impl.repository.RuleBo ruleBo,
                                                                                   org.kuali.rice.krms.impl.repository.RuleBo falseActionRuleBo)
This method adds the dummy rule into database for falseAction.

Parameters:
ruleBo -
falseActionRuleBo -
Returns:
AgendaItemBo

getCategory

public org.kuali.rice.krms.impl.repository.CategoryBo getCategory()
Gets the category attribute.

Returns:
Returns the category

setCategory

public void setCategory(org.kuali.rice.krms.impl.repository.CategoryBo category)
Sets the category attribute value.

Parameters:
category - .The category to set.

getContext

public org.kuali.rice.krms.impl.repository.ContextBo getContext()
Gets the context attribute.

Returns:
Returns the context

setContext

public void setContext(org.kuali.rice.krms.impl.repository.ContextBo context)
Sets the Context attribute value.

Parameters:
context -

getAgendaBo

public org.kuali.rice.krms.impl.repository.AgendaBo getAgendaBo()
Gets the agendaBo attribute.

Returns:
Returns agendaBo.

setAgendaBo

public void setAgendaBo(org.kuali.rice.krms.impl.repository.AgendaBo agendaBo)
Sets the agendaBo attribute value.

Parameters:
agendaBo -

getRuleBo

public org.kuali.rice.krms.impl.repository.RuleBo getRuleBo()
Gets the ruleBo attribute.

Returns:
Returns ruleBo.

setRuleBo

public void setRuleBo(org.kuali.rice.krms.impl.repository.RuleBo ruleBo)
Sets the ruleBo attribute value.

Parameters:
ruleBo -


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