All models located under internal package are not exported by core components bundles. This means you cannot use them directly, this is done by design.
The proper way to extend Core Components model is to use delegation pattern. Here you can find some information with examples:
@Model(adaptables = SlingHttpServletRequest.class,
adapters = List.class,
resourceType = "myproject/components/list")
public class ListImpl implements List {
@Self
@Via(type = ResourceSuperType.class)
private List list;
/**
* using original implementation
*/
@Override
public String getDateFormatString() {
// place for custom implementation that will be different comparing to orignal one
}
/**
* using original implementation
*/
@Override
public boolean linkItems() {
// simply run method from Core Components List implementation
return list.linkItems();
}
// place for other methods from List interface
}
All models located under internal package are not exported by core components bundles. This means you cannot use them directly, this is done by design.
The proper way to extend Core Components model is to use delegation pattern. Here you can find some information with examples:
@Model(adaptables = SlingHttpServletRequest.class,
adapters = List.class,
resourceType = "myproject/components/list")
public class ListImpl implements List {
@Self
@Via(type = ResourceSuperType.class)
private List list;
/**
* using original implementation
*/
@Override
public String getDateFormatString() {
// place for custom implementation that will be different comparing to orignal one
}
/**
* using original implementation
*/
@Override
public boolean linkItems() {
// simply run method from Core Components List implementation
return list.linkItems();
}
// place for other methods from List interface
}