Private Entities
As part of module publication, you can mark following entities Private in MPT:
RoleTypes
Inbound/Outbound Interfaces
Views
Actions
Issues
If the above entities are marked Private in the MPT then these entities will be available in the defining module only. Also, a separate private constant class will be generated for private entities.
Public constant class:
// Copyright (c) 2003-2009, One Network Enterprises, Inc. All rights reserved.package com.mybooks.mpt;import com.onenetwork.platform.data.model.DefaultModelActions;/** * Constants for ZBKS.Book model */public class ZBKSBookConstants { /** Actions for the Model */ public class Actions extends DefaultModelActions { /** */ public static final String CREATE_BOOK = "ZBKS.CreateBook"; /** */ public static final String PUBLISH = "ZBKS.Publish"; /** */ public static final String CREATE = "ZBKS.Create"; /** */ public static final String UPDATE = "ZBKS.Update"; } /** Views for the Model */ public class Views { /** */ public static final String PROPOSED_BOOKS = "ZBKS.ProposedBooks"; /** */ public static final String BOOKS_BY_TITLE = "ZBKS.BooksByTitle"; /** */ public static final String BOOK_DETAIL = "ZBKS.BookDetail"; } /** States for the Model */ public class States { /** */ public static final String PUBLISHED = "Published"; /** */ public static final String PROPOSED = "Proposed"; } /** Issues for the Model */ public class Issues { /** Issue to capture all the books that are not in good condition. This issue computation will be integrated with the "ReturnBook" workflow */ public static final String NOT_IN_GOOD_CONDITION = "ZBKS.NotInGoodCondition"; } }Private constant class extending public:
// Copyright (c) 2003-2009, One Network Enterprises, Inc. All rights reserved.package com.mybooks.mpt;/** * Constants for ZBKS.Book model */public class ZBKSBookPrivateConstants extends ZBKSBookConstants { /** Private Actions for the Model */ public class Actions extends ZBKSBookConstants.Actions { /** */ public static final String PRIVATE_CREATE_ACTION = "ZBKS.PrivateCreateAction"; } /** Private Views for the Model */ public class Views extends ZBKSBookConstants.Views { /** */ public static final String PRIVATE_BOOKS_BY_AUTHOR_VIEW = "ZBKS.PrivateBooksByAuthorView"; } /** Private Issues for the Model */ public class Issues extends ZBKSBookConstants.Issues { /** */ public static final String PRIVATE_PERSONALIZED_ISSUE = "ZBKS.PrivatePersonalizedIssue"; } }Entities can be marked Private only in the defining module, i.e. inherited entities cannot be marked Private.