Project

General

Profile

« Previous | Next » 

Revision 7557

add methods to set the SolrIndex instance and initialize the listener (includes overloaded constructor)

View differences:

SystemMetadataEventListener.java
54 54
    private IMap<Identifier, String> objectPathMap;
55 55
    
56 56
    /**
57
     * Register this instance as a system metadata map event listener.
57
     * Default constructor - caller needs to initialize manually
58
     * @see setSolrIndex()
59
     * @see start()
58 60
     */
61
    public SystemMetadataEventListener() {
62
    }
63
    
64
    /**
65
     * Sets the SolrIndex instance and initializes the listener 
66
     * @param solrIndex
67
     */
68
    public SystemMetadataEventListener(SolrIndex solrIndex) {
69
    	this.solrIndex = solrIndex;
70
    	start();
71
    }
72
    
73
    /**
74
     * Get the SolrIndex that this listener communicates with
75
     * @return a SolrIndex instance that indexes the content being listened to
76
     */
77
    public SolrIndex getSolrIndex() {
78
		return solrIndex;
79
	}
80

  
81
    /**
82
     * Set the SolrIndex instance that the listener modifies
83
     * @param solrIndex
84
     */
85
	public void setSolrIndex(SolrIndex solrIndex) {
86
		this.solrIndex = solrIndex;
87
	}
88

  
89
	/**
90
     * Registers this instance as a system metadata map event listener
91
     */
59 92
    public void start() {
60 93
    	
61 94
    	// get config values
......
99 132
    }
100 133

  
101 134
    /**
102
     * Removes this instance as a system metadata map event listener.
135
     * Removes this instance as a system metadata map event listener
103 136
     */
104 137
    public void stop() {
105 138
    	log.info("stopping index entry listener...");

Also available in: Unified diff