def testConfigurationParser(self): ''' ''' assemblyScanning = Assembly('Files scanner') registerListeners = RegisterListeners() registerListeners.patterns = ['file:///home/mihaigociu/Work/notifier_test/test1.txt', 'file:///home/mihaigociu/Work/*/test1.txt'] assemblyScanning.add(initialize(registerListeners), initialize(FileSystemScanner())) # assemblyScanning.add(initialize(RegisterListeners())) proc = assemblyScanning.create() assert isinstance(proc, Processing) proc.execute(FILL_ALL)
def testConfigurationParser(self): ''' ''' assemblyScanning = Assembly('Files scanner') registerListeners = RegisterListeners() registerListeners.patterns = [ 'file:///home/mihaigociu/Work/notifier_test/test1.txt', 'file:///home/mihaigociu/Work/*/test1.txt' ] assemblyScanning.add(initialize(registerListeners), initialize(FileSystemScanner())) # assemblyScanning.add(initialize(RegisterListeners())) proc = assemblyScanning.create() assert isinstance(proc, Processing) proc.execute(FILL_ALL)
def createAssemplyParsing(self): parser = ParserHandler() parser.rootNode = RuleRoot() anonymous = parser.rootNode.addRule(GroupRule(), 'Config/Anonymous') captcha = parser.rootNode.addRule(GroupRule(), 'Config/Captcha') right = parser.rootNode.addRule(RightRule('name', 'inherits'), 'Config/Right') right.addRule(DescriptionRule(), 'Description') #allows = anonymous.addRule(AccessRule(), 'Allows') allows = Node('Allows') allows.addRule(AccessRule()) #allows.addRule(MethodRule(fromAttributes=True)) allows.addRule(URLRule(), 'URL') allows.addRule(MethodRule(), 'Method') action = Node('Action') action.addRule(ActionRule()) action.childrens['Action'] = action actions = Node('Actions') actions.childrens['Action'] = action anonymous.childrens['Actions'] = actions anonymous.childrens['Action'] = action anonymous.childrens['Allows'] = allows #no actions for captcha captcha.childrens['Allows'] = allows right.childrens['Actions'] = actions right.childrens['Action'] = action right.childrens['Allows'] = allows assemblyParsing = Assembly('Parsing XML') assemblyParsing.add(initialize(parser)) return assemblyParsing
def assemblyBlocks() -> Assembly: ''' The assembly containing the indexing blocks providers. ''' return Assembly('Blocks')
def assemblyResources() -> Assembly: ''' The assembly containing the handlers that will be used in processing a REST request. ''' return Assembly('REST resources')
def assemblyServer() -> Assembly: ''' The assembly used in processing the server requests. ''' return Assembly('Server')
def assemblyRESTRequest() -> Assembly: ''' The assembly containing the handlers that will be used in processing the gateway REST requests. ''' return Assembly('Gateway REST data')
def assemblyForward() -> Assembly: ''' The assembly containing the handlers that will be used for forwarding the request. ''' return Assembly('Gateway forward')
def assemblyValidationInvoking() -> Assembly: ''' The assembly containing the handlers that will be used for handling an invoking. ''' return Assembly('Request validation invoking')
def assemblyDecodePath() -> Assembly: ''' The assembly containing the decoders for path items. ''' return Assembly('Decode path')
def assemblyGroupGateways() -> Assembly: ''' The assembly used for generating the group gateways''' return Assembly('Group gateways')
def assemblyDocumentation() -> Assembly: ''' The assembly containing the documentation handling. ''' return Assembly('Documentation')
def assemblyConfiguration() -> Assembly: return Assembly('GUI Configurations')
def assemblyResourcesGateway(): b = Assembly('Gateway REST resources') b.add(assemblyResources()) b.replace(uri(), uriGateway()) return b
def assemblyResourcesGateway(): b = Assembly('Gateway REST resources') b.add(assemblyResources()) b.replace(encoderPathResource(), encoderPathResourceGateway()) return b
def assemblyDecodePathExport() -> Assembly: ''' The assembly containing the decoders for path items export. ''' return Assembly('Decode path export')
def assemblyRESTInternal() -> Assembly: ''' The assembly containing the handlers that will be used for internally processing REST resources. ''' return Assembly('Filter REST resources')
def assemblyErrorDelivery() -> Assembly: ''' The assembly containing the handlers that will be used in delivery for the error responses. ''' return Assembly('Error delivery')
def assemblyBind() -> Assembly: '''The assembly containing the handlers used for binding services/classes with SQL alchemy support''' return Assembly('Bind SQL alchemy')
def assemblyIntrospection() -> Assembly: ''' The assembly used for generating the introspection models''' return Assembly('Introspection')
def assemblySQLAssembler() -> Assembly: ''' The assembly containing the handlers to be used in the assembly of invokers for error handling. ''' return Assembly('Assemblers SQL alchemy', reportUnused=False)
def assemblyGateway() -> Assembly: ''' The assembly containing the handlers that will be used in processing the gateway. ''' return Assembly('Gateway')
def assemblyAssembler() -> Assembly: ''' The assembly containing the handlers to be used in the assembly of invokers into the root node. ''' return Assembly('Assemblers')
def assemblyNotFound() -> Assembly: ''' The assembly containing the handlers that will be used in processing a not found request. ''' return Assembly('Not found')
def assemblyDecodeParameterExport() -> Assembly: ''' The assembly containing the decoders for parameters export. ''' return Assembly('Decode parameter export')
def assemblyAnonymousGateways() -> Assembly: ''' The assembly used for generating anonymous gateways''' return Assembly('Anonymous gateways')
def assemblyDecodeQuery() -> Assembly: ''' The assembly containing the decoders for query parameters. ''' return Assembly('Decode parameter query')
def assemblyMultipartPopulate() -> Assembly: ''' The assembly containing the handlers that will populate data on the next request content. ''' return Assembly('Multipart content populate')
def assemblyDecodeOrder() -> Assembly: ''' The assembly containing the decoders for order parameters. ''' return Assembly('Decode parameter order')
def assemblyContent() -> Assembly: ''' The assembly containing the handlers that will be used in processing a content file request. ''' return Assembly('CDM')
def assemblyDecodeListItem() -> Assembly: ''' The assembly containing the decoders for list items. ''' return Assembly('Decode parameter list item')