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