Fisher
Fisher

Reputation: 1794

Overriding liferay core interface

Is there any way to override liferays core interface, for example com.liferay.portal.model.Plugin ?

I tried already overriding classes, but have some problems with interfaces. I've created new "ext" plugin, and put package com.liferay.portal.model in both:

docroot/WEB-INF/ext-impl/src and docroot/WEB-INF/ext-service/src

and of course put in that package interface Plugin.

To test overriding ive added to method declaration

public void test();

but Plugin interface doesnt get overriden.

What i did worked with class, but i cannot make those damn interfaces working.

Is there any way to acomplish what im trying to do ?

Upvotes: 0

Views: 385

Answers (1)

Olaf Kock
Olaf Kock

Reputation: 48077

You're creating an upgrade nightmare for yourself if you change the core interfaces - most likely you'll have huge problems every time you upgrade. And your sample (adding public void test()) doesn't hint that there's a real usecase for this.

I assume that it'll be a lot simpler to just add your interface/feature/functionality in new classes or to add your functionality in other plugins until you give proper usecases. Once you provide these, we can actually start talking about proper solutions for them. And, most likely, they don't involve messing with the internal interfaces of Liferay's implementation.

Upvotes: 2

Related Questions