示例#1
0
 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)
示例#2
0
    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)
示例#3
0
 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
示例#4
0
def assemblyBlocks() -> Assembly:
    '''
    The assembly containing the indexing blocks providers.
    '''
    return Assembly('Blocks')
示例#5
0
def assemblyResources() -> Assembly:
    '''
    The assembly containing the handlers that will be used in processing a REST request.
    '''
    return Assembly('REST resources')
示例#6
0
def assemblyServer() -> Assembly:
    '''
    The assembly used in processing the server requests.
    '''
    return Assembly('Server')
示例#7
0
def assemblyRESTRequest() -> Assembly:
    '''
    The assembly containing the handlers that will be used in processing the gateway REST requests.
    '''
    return Assembly('Gateway REST data')
示例#8
0
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')
示例#10
0
def assemblyDecodePath() -> Assembly:
    '''
    The assembly containing the decoders for path items.
    '''
    return Assembly('Decode path')
示例#11
0
def assemblyGroupGateways() -> Assembly:
    ''' The assembly used for generating the group gateways'''
    return Assembly('Group gateways')
示例#12
0
def assemblyDocumentation() -> Assembly:
    '''
    The assembly containing the documentation handling.
    '''
    return Assembly('Documentation')
示例#13
0
def assemblyConfiguration() -> Assembly:
    return Assembly('GUI Configurations')
示例#14
0
 def assemblyResourcesGateway():
     b = Assembly('Gateway REST resources')
     b.add(assemblyResources())
     b.replace(uri(), uriGateway())
     return b
示例#15
0
 def assemblyResourcesGateway():
     b = Assembly('Gateway REST resources')
     b.add(assemblyResources())
     b.replace(encoderPathResource(), encoderPathResourceGateway())
     return b
示例#16
0
def assemblyDecodePathExport() -> Assembly:
    '''
    The assembly containing the decoders for path items export.
    '''
    return Assembly('Decode path export')
示例#17
0
def assemblyRESTInternal() -> Assembly:
    '''
    The assembly containing the handlers that will be used for internally processing REST resources.
    '''
    return Assembly('Filter REST resources')
示例#18
0
def assemblyErrorDelivery() -> Assembly:
    '''
    The assembly containing the handlers that will be used in delivery for the error responses.
    '''
    return Assembly('Error delivery')
示例#19
0
def assemblyBind() -> Assembly:
    '''The assembly containing the handlers used for binding services/classes with SQL alchemy support'''
    return Assembly('Bind SQL alchemy')
示例#20
0
 def assemblyIntrospection() -> Assembly:
     ''' The assembly used for generating the introspection models'''
     return Assembly('Introspection')
示例#21
0
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)
示例#22
0
def assemblyGateway() -> Assembly:
    '''
    The assembly containing the handlers that will be used in processing the gateway.
    '''
    return Assembly('Gateway')
示例#23
0
def assemblyAssembler() -> Assembly:
    '''
    The assembly containing the handlers to be used in the assembly of invokers into the root node.
    '''
    return Assembly('Assemblers')
示例#24
0
def assemblyNotFound() -> Assembly:
    '''
    The assembly containing the handlers that will be used in processing a not found request.
    '''
    return Assembly('Not found')
示例#25
0
def assemblyDecodeParameterExport() -> Assembly:
    '''
    The assembly containing the decoders for parameters export.
    '''
    return Assembly('Decode parameter export')
示例#26
0
def assemblyAnonymousGateways() -> Assembly:
    ''' The assembly used for generating anonymous gateways'''
    return Assembly('Anonymous gateways')
示例#27
0
def assemblyDecodeQuery() -> Assembly:
    '''
    The assembly containing the decoders for query parameters.
    '''
    return Assembly('Decode parameter query')
示例#28
0
def assemblyMultipartPopulate() -> Assembly:
    '''
    The assembly containing the handlers that will populate data on the next request content.
    '''
    return Assembly('Multipart content populate')
示例#29
0
def assemblyDecodeOrder() -> Assembly:
    '''
    The assembly containing the decoders for order parameters.
    '''
    return Assembly('Decode parameter order')
示例#30
0
def assemblyContent() -> Assembly:
    '''
    The assembly containing the handlers that will be used in processing a content file request.
    '''
    return Assembly('CDM')
示例#31
0
def assemblyDecodeListItem() -> Assembly:
    '''
    The assembly containing the decoders for list items.
    '''
    return Assembly('Decode parameter list item')